От: Rikard Pavelic
Тема: Re: Stored procedures
Дата: ,
Msg-id: 43D13217.2030704@zg.htnet.hr
(см: обсуждение, исходный текст)
Ответ на: Re: SELECT MIN, MAX took longer time than SELECT COUNT, MIN, MAX  (Tom Lane)
Список: pgsql-performance

Скрыть дерево обсуждения

SELECT MIN, MAX took longer time than SELECT COUNT, MIN, MAX  (K C Lau, )
 Re: SELECT MIN, MAX took longer time than SELECT COUNT, MIN, MAX  ("Jim C. Nasby", )
  Re: SELECT MIN, MAX took longer time than SELECT COUNT, MIN, MAX  (Tom Lane, )
   Re: Stored procedures  (Rikard Pavelic, )
   Re: SELECT MIN, MAX took longer time than SELECT  (K C Lau, )
  Re: SELECT MIN, MAX took longer time than SELECT  (K C Lau, )

>
>> Hi,
>>
>> Will simple queries such as "SELECT * FROM blah_table WHERE tag='x';
>> work any
>> faster by putting them into a stored procedure?

>
> IMHO no, why do you think so? You can use PREPARE instead, if you have
> many
> selects like this.


I tought that creating stored procedures in database means
storing it's execution plan (well, actually storing it like a
compiled object). Well, that's what I've learned couple a years
ago in colledge ;)

What are the advantages of parsing SP functions every time it's called?

My position is that preparing stored procedures for execution solves
more problems, that it creates.
And the most important one to be optimizing access to queries from
multiple connections (which is one of the most important reasons for
using stored procedures in the first place).

Best regards,
    Rikard




В списке pgsql-performance по дате сообщения:

От: "Steinar H. Gunderson"
Дата:
Сообщение: Re: [GENERAL] Creation of tsearch2 index is very slow
От: "Craig A. James"
Дата:
Сообщение: Re: [GENERAL] Creation of tsearch2 index is very slow