"Richard Huxton" <[EMAIL PROTECTED]> writes:
>> ?? 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.
> Surely if you used a seqscan on "where x=1" and only got 2
"Richard Huxton" <[EMAIL PROTECTED]> 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 n
Chris Jones <[EMAIL PROTECTED]> writes:
>> Ah. You must have a few values that are far more frequent (like tens of
>> thousands of occurrences?) and these are throwing off the planner's
>> statistics.
> I had a similar situation, where I had a lot of rows with 0's in
> them. Changing those to N
On Thu, May 10, 2001 at 05:22:07PM -0400, Tom Lane wrote:
> [EMAIL PROTECTED] writes:
> > No the query usually returns between 0 and 5 rows. Usually not zero -
> > most often 1.
>
> Ah. You must have a few values that are far more frequent (like tens of
> thousands of occurrences?) and these a
[EMAIL PROTECTED] writes:
> No the query usually returns between 0 and 5 rows. Usually not zero -
> most often 1.
Ah. You must have a few values that are far more frequent (like tens of
thousands of occurrences?) and these are throwing off the planner's
statistics.
7.2 will probably do better
On Thu, May 10, 2001 at 01:22:56PM +, [EMAIL PROTECTED] wrote:
> I vacuum every half hour! Here is the output from EXPLAIN:
>
> NOTICE: QUERY PLAN:
>
> Seq Scan on pa_shopping_cart (cost=0.00..7237.94 rows=9420 width=296)
>
> EXPLAIN
>
> Thanks!
Then try
set enable_seqscan to off;
exp