Re: [GENERAL] stored proc vs sql query string

2006-04-10 Thread Mark Aufflick
On 4/7/06, Jim Nasby <[EMAIL PROTECTED]> wrote: > You're forgetting that (at least in plpgsql), "raw" queries get > compiled into prepared statements. Prepared statements are faster to > execute than queries that have to be manually parsed every time. Of > course you can pass in prepared statements

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Jim Nasby
On Apr 6, 2006, at 6:39 AM, Sean Davis wrote: On 4/6/06 12:12 AM, "surabhi.ahuja" <[EMAIL PROTECTED]> wrote: i have heard somewhere that writing a stored procedure, is much better than firing a sql query(such as select * from table_name) onto the database. is it true and if yes how? This

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Chris Browne
[EMAIL PROTECTED] ("surabhi.ahuja") writes: > i have heard somewhere that writing a stored procedure, is much > better than firing a sql query(such as select * from > table_name) onto the database. > > is it true and if yes how? It can be way more efficient. Consider two alternative ways of handl

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Kenneth Downs
Merlin Moncure wrote: It has been more or less proven that functional, declaritive style coding has less errors and is more reliable than mixed sql/procedural applciation code given developers with equal skill. I did not know there were empirical studies on this, I would love to be able to re

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Merlin Moncure
> > i have heard somewhere that writing a stored procedure, is much better than > > firing a sql query(such as select * from table_name) onto the database. > > is it true and if yes how? stored procedures (functions on postgresql) eliminate a lot of overhead. they also provide a lot of covenience

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Sean Davis
On 4/6/06 12:12 AM, "surabhi.ahuja" <[EMAIL PROTECTED]> wrote: > i have heard somewhere that writing a stored procedure, is much better than > firing a sql query(such as select * from table_name) onto the database. > is it true and if yes how? This isn't going to be true most of the time, I th

[GENERAL] stored proc vs sql query string

2006-04-05 Thread surabhi.ahuja
i have heard somewhere that writing a stored procedure, is much better than firing a sql query(such as select * from table_name) onto the database. is it true and if yes how?   also i want to know that is the performnance in java slower as compared to cpp, given that the same things is being do