embedded sql regression from 8.2.4 to 8.3.7

Поиск
Список
Период
Сортировка
От Haszlakiewicz, Eric
Тема embedded sql regression from 8.2.4 to 8.3.7
Дата
Msg-id 9D29FD18CBD74A478CBA86E6EF6DBAD403DBB05A@CHI4EVS04.corp.transunion.com
обсуждение исходный текст
Ответы Re: embedded sql regression from 8.2.4 to 8.3.7  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-performance
I noticed a bit of a performance regression in embedded sql queries when
moving from the client libraries in verison 8.2.4 to 8.3.7.  My
application does a whole lot of queries, many of which don't return any
data.  When we moved to the new libraries the time of running a query
(from the application point of view) went from about 550 usec to 800
usec.  In both cases this was against a server running 8.3.7.
I turned on log_statement_stats and noticed that the behaviour is
slightly different, and the 8.3.7 version sends the statement to the
server twice, while 8.2.4 only sends it once.

    const char *SQL_text = "select * from foo";  (not always the same
query)
    exec sql prepare s_1ab from :SQL_text;   <---- [*1]
    exec sql declare c_1ab cursor for s_1ab;
    exec sql open c_1ab;                     <---- [*2]

At [*1], with the 8.3.7 libraries, I see in the server log:
STATEMENT:  select * from foo

With 8.2.4, nothing is logged.  Both versions send the statement to
declare the cursor:
STATEMENT:  declare c_1ab  cursor  for select * from foo

Suggestions?

eric

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Huge difference in query performance between 8.3 and 8.4 (possibly)
Следующее
От: "Hartman, Matthew"
Дата:
Сообщение: Re: Huge difference in query performance between 8.3 and 8.4 (possibly)