Skip site navigation (1) Skip section navigation (2)

Re: same query in high number of times

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Alban <peter(dot)alban2(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: same query in high number of times
Date: 2009-06-21 17:42:23
Message-ID: 603c8f070906211042k4dc3383dm10c9475eab195182@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Sun, Jun 21, 2009 at 6:54 AM, Peter Alban<peter(dot)alban2(at)gmail(dot)com> wrote:
> Should PG realize that if the table data is same should the query result set
> also be the same ?

No.  That's not so easy to implement as you might think.  Saving the
results of each previous query in case someone issues the same query
again without having changed anything in the meantime would probably
cost more in performance on average that you'd get out of it.

> Where do I see what the PG does ? I can see now the query's that take long
> time ,but do not have information about what the optimizer does neither when
> the DB decides about to table scan or cache ?

Can't you get this from EXPLAIN and EXPLAIN ANALYZE?

...Robert

In response to

Responses

pgsql-performance by date

Next:From: Peter AlbanDate: 2009-06-21 18:28:15
Subject: Re: same query in high number of times
Previous:From: Justin GrafDate: 2009-06-21 14:01:05
Subject: Re: same query in high number of times

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group