Search Postgresql Archives

Re: stored proc vs sql query string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/6/06 12:12 AM, "surabhi.ahuja" <surabhi.ahuja@xxxxxxxxxxx> 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 think.  Write SQL where you
can, and where you can't (because you can't express something in SQL), write
a procedure.  There are places where using a stored procedure can be more
efficient, but I think starting with SQL, benchmarking and testing, and then
determining what queries need special attention is the best way to go at the
beginning.

> also i want to know that is the performnance in java slower as compared to
> cpp, given that the same things is being done.

Java and cpp performance are not really related to postgresql performance.
You will probably need to ask that on another list.  There are many other
reasons to choose one language over another besides speed (in fact, I think
speed is probably not the first thing to think about when choosing a
language).

Sean



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux