> From: "Mike yearwood" <[EMAIL PROTECTED]> > I had reason to run a test of SPs vs SQL. If the SP is doing the same > thing as a simple query, you're not going to gain anything by using > the SP. In my test the straight query was 2x faster.
I beg to differ. Each time you submit a query statement the server must create an execution plan for it. When it generates the plan it then runs it. With an SP the plan is already pre set and depending on table growth it may not get regenerated for a long time. > An SP that does a lot of processing with direct access to multiple > other tables should be faster than a local procedure that extracts all > the relevant data before processing. That does not mean you can't mix > the two approaches. It's a myth that SPs are *always* faster. It's not a myth. Look at execution plans and your going to see the why behind the code that SPs are based upon. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

