Show plan cache use by database..?

  • Hi all,

    We have a database server that has a bunch of databases on it. One of them started have worse and worse query response times so we thought maybe the plan cache was being "used up" by the other databases. (We suspected this because queries were being constantly recompiled, among other things.)

    Anyway, we took the other databases offline, restarted the server, and now everything is great. ( ).

    My questions are:

    1) Is it possible that the other databases were somehow "hogging" the cache?

    2) Is there any way to find out how much memory is begin used by each database on a server? (perfmon,etc.)

    thanks!

  • If the other databases were in much heavier use than the one, yeah, they might very well end up taking over most of the cache.

    More often, though, there are other reasons for constant recompiles. Statistics updates, large data changes, etc.

    System view sys.syscacheobjects has data on what's in cache, including database ID, etc.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • OK, thanks! Btw: you don't know of any type of perf monitor counter that would show this?

  • I don't, but I also haven't looked for one. Hasn't come up for me.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply