SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Silicon Investor, under the hood

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: SI Bob who wrote (1)12/14/2004 8:19:13 PM
From: SI Dave  Read Replies (1) of 81
 
Wow, just found this board.

>But a pet peeve of mine (reading this, Dave?) is using stored procs for routines

Now, let's be fair. When I first asked about this, your stated preference was that everything be in an sproc so we could easily see dependencies. Your preference has migrated a bit, and you might note that many of my sprocs now begin with "util" so they float to the bottom of the list and are grouped together. I'll get them all there, eventually.

>>I'm not sure that you can, for example pass "INNER JOIN table1 ON table2" (and keeping in mind that there could be 1 through ~4 joins) as an SP parm then do a "SELECT * from message @joinparm". If you can, it'd reduce the number of SP's needed, but I think it'd completely circumvent the query execution planner, making the SP perform no faster than the T-SQL.

You can, but I doubt the execution planner can "see" it. I recently modified the message deletion sproc to build a SQL statement on the fly so it would hit the correct search table, and then EXEC the MS sproc for executing a SQL statement. I can't imagine the execution planner can pre-process that, especially since there are variables used to build the statement.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext