On Friday, February 7, 2003 at 23:16, Bill Mais wrote:

BM> It makes sense the sp can only be compiled if it is complete.

the stored procedure will be compiled, but will be recompiled on each use
as the sql changed.  this means that the database can't use the execution
plan it has calculated for that procedure.

if you're using ms sql server and want to head down this route, one thing
you might want to take a look at is sp_executesql which might be able to
get away without recompilation.  also be aware of the security implications
of using dynamic sql in a stored proc, the user executing the procedure has
to have permissions on the tables you are trying to select from.

BM> I should have said IN not LIKE but I am sure the same things apply.  I
BM> will check the indexes again and also see if we can archive some stuff.

if you are using ms sql 2k, you can pass in a string and use a user defined
function to return a table that you can join to your query.  might be
easier.

hth,

darren


____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] 
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: archive@jab.org
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to