Previously
>Perhaps not all these factors are always important, but in big and
>heavy loaded systems it's really unimaginable to send "raw" queries.
Interesting,
I have heard this often... mainly from SQL Server folk....
I find it hard to understand what is bad about "raw" sql.... here is why :
As I understand it, every query goes through the stages of
parse,execute, [and possibly fetch(es)].
Stored procedures can only save you the parse phase (at best) - which is
usually a tiny component of the total cost/elapsed time (and when it is
not, then you probably have a data warehouse with an ad-hoc query tool
issueing complex queries - which is not ameniable to the use of
procedures either).
Furthur several databases managers save (or provide methods to) the
parse tree for a query class (Oracle and DB2 for instance), so in these
cases there is zero difference in performance between "raw" and
"procedured" sql.
I dont want to do a "bash SQL Server" thing here (as its quite a good
product)...but I do wonder if it has a very expensive parse phase.
regards
Mark