LineVoltageHalogen (tr****************@yahoo.com) writes:
You say it is neglible. However, what if this process runs 50 - 100
thousand times during each load process? EAch of those small neglible
pieces will add up to something measurable?
If you really want to know, you would have to benchmark. But say that
you have one single statement in the cache of the type:
INSERT dbo.tbl(col1, col2, ...) VALUES (@par1, @par2, ...)
Then the overhead compared to find the stored procedure load_one_row is the
longer time it takes to compute the hash bucket to find it the cache. I
would guess that is miniscule. Note, though, the dbo part. That may be
important.
And, assume that you have a case-insensitive database, and your beloved
programmer has spelt the procedure Load_one_row. Now you will first get a
cache miss, even if you prefix with dbo, because the cache is case
sensitive. After a lookup in the catalog you will eventually hit the cache
anyway.)
Also stored procedures should be prefixed with dbo. when you call them.
(Provided that they are owned by dbo, that is!)
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp