Hi
I am trying to understand SQL Server's internals and I was wondering
how syscacheobjects works with memory.
If an application sends a query to the database, does the execution plan
stay in both memory and syscacheobjects or is syscacheobjects
a table representation of what's in memory? When the optimizer
looks to try to re use a plan, where does it look?
TIA
Davesyscacheobjects is not a real table:
SELECT OBJECTPROPERTY(id, 'TableIsFake')
FROM sysobjects
WHERE id = OBJECT_ID('syscacheobjects')
It is essentially a view over the procedure cache, which is the area in
memory where procedures are cached (good name for it, isn't it?) The
optimizer looks at the memory structures, not at the table.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Dodo Lurker" <none@.noemailplease> wrote in message
news:3cudnTXSXpYJJgzeRVn-hg@.comcast.com...
> Hi
> I am trying to understand SQL Server's internals and I was wondering
> how syscacheobjects works with memory.
> If an application sends a query to the database, does the execution plan
> stay in both memory and syscacheobjects or is syscacheobjects
> a table representation of what's in memory? When the optimizer
> looks to try to re use a plan, where does it look?
> TIA
> Dave
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment