Re: Re: Query not using index - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: Query not using index
Date
Msg-id 5346.989537274@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Query not using index  ("Richard Huxton" <dev@archonet.com>)
List pgsql-general
"Richard Huxton" <dev@archonet.com> writes:
> Why doesn't PG (or any other system afaik) just have a first guess, run the
> query and then if the costs are horribly wrong cache the right result.

?? Knowing that your previous guess was wrong doesn't tell you what the
right answer is, especially not for the somewhat-different question that
the next query is likely to provide.

The real problem here is simply that PG hasn't been keeping adequately
detailed statistics.  I'm currently working on improving that for 7.2...
see discussions over in pghackers if you are interested.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Slowdown problem when writing 1.7million records
Next
From: Bruce Momjian
Date:
Subject: Re: Re: Query not using index