Re: Cached Query Plans (was: global prepared statements) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cached Query Plans (was: global prepared statements)
Date
Msg-id 14355.1208053064@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cached Query Plans (was: global prepared statements)  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Responses Re: Cached Query Plans (was: global prepared statements)
List pgsql-hackers
"Jonah H. Harris" <jonah.harris@gmail.com> writes:
> On Sat, Apr 12, 2008 at 2:19 PM, Dawid Kuroczko <qnex42@gmail.com> wrote:
>> There are other benefits as well.  Oracle lets you see the statistics associated
>> with given plans.  So you can see how many times given (cached) query was
>> executed, how much resources did it consume and do on.

> Yes, and it also uses that data at both the statement and column level
> to determine what needs more analysis to help build better plans in
> the future.

>> Right now the only way of getting such information from PostgreSQL is by
>> logging all queries and analyzing logs.  The current_query column of
>> pg_stat_activity is useless as the (prepared) queries are usually so short
>> lived that you will see one execution out of thousands happening.

> Yes, this is worthless on large active databases.  The logging
> overhead alone starts to affect performance.

But somehow, all that stuff with cached plans is free?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: Cached Query Plans (was: global prepared statements)
Next
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Strengthen warnings about using pg_dump's -i option.