Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1

Поиск
Список
Период
Сортировка
Искать
От
Dimitri Fontaine
Тема
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1
Дата
Msg-id
FF8BF3BA-E520-43D4-B69A-FDD647A829C6@hi-media.com
Ответ на
Список
Дерево обсуждения
Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Craig Ringer <craig@postnewspapers.com.au>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Craig Ringer <craig@postnewspapers.com.au>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Andres Freund <andres@anarazel.de>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Andres Freund <andres@anarazel.de>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Andres Freund <andres@anarazel.de>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Andres Freund <andres@anarazel.de>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Dimitri Fontaine <dfontaine@hi-media.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Mike Ivanov <mikei@activestate.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Mike Ivanov <mikei@activestate.com>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 Greg Stark <gsstark@mit.edu>
Re: Repeated Query is much slower in PostgreSQL8.2.4 than DB2 9.1 ning <mailxiening@gmail.com>
Hi,

Le 16 juil. 09 à 11:52, Andres Freund a écrit :
> If I interpret those findings correcty the execution is approx. as  
> fast as DB2,
> only DB2 is doing automated plan caching while pg is not.
>
> If it _really_ is necessary that this is that fast, you can prepare  
> the query
> like I showed.

A form of automatic plan caching by PostgreSQL is possible and  
available as an extension called "preprepare", which aims to have your  
statements already prepared by the time you're able to send queries  
in, at which point you simply EXECUTE and never care about the PREPARE  
in your code.
   http://preprepare.projects.postgresql.org/README.html

The module is only available for PostgreSQL 8.3 or 8.4, and works in a  
fully automatic manner only in 8.4 (using local_preload_librairies),  
and in both cases requires you to:
  - edit postgresql.conf and restart if preloading, else reload
  - put your full PREPARE statements into a table
  - psql -c "EXECUTE myquery;" mydb
  - enjoy

Regards,
-- 
dim

PS: soon to be in debian sid for both 8.3 and 8.4, currently in NEW  
queue
В списке pgsql-performance по дате отправления
От: Kevin Grittner
Дата:
Сообщение: Re: cluster index on a table
От: Greg Stark
Дата:
Сообщение: Re: cluster index on a table
FAQ