|
Posted by codefragment on 11/15/07 21:42
> There is some truth here. When the value of the parameters is
> available to the optimizer at compile time
but what I mean is not the parameters, but something like this
declare @var int
set @var = 1
select * from table where somecolumn=@var
as opposed to a stored procedure where @var is a parameter
This info came from this:
http://www.amazon.co.uk/Inside-Microsoft-SQL-Server-2005/dp/0735621969/ref=sr_1_1?ie=UTF8&s=books&qid=1195162743&sr=8-1
p217 (dug this out), it just seems very odd though, I can't understand
why this would be the case so I could
not be understanding this correctly. I'd be interested in knowing what
Oracle\mySQL do.
> There is only one optimizer. Under some circumstances multiple
> execution plans can be cached for the same stored procedure.
what sort of circumstances?
thanks for the reply, appreciated
Navigation:
[Reply to this message]
|