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