Re: [GENERAL] I feel the need for speed. What am I doing wrong? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] I feel the need for speed. What am I doing wrong?
Date
Msg-id 645.1041998855@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] I feel the need for speed. What am I doing wrong?  (johnnnnnn <john@phaedrusdeinus.org>)
List pgsql-hackers
johnnnnnn <john@phaedrusdeinus.org> writes:
> On Tue, Jan 07, 2003 at 03:10:06PM -0800, Dann Corbit wrote:
>> ->  Seq Scan on CNX_DS_53_SIS_STU_OPT_FEE_TB a
>> (cost=100000000.00..100112549.62 rows=6139062 width=24)

> Those big round numbers suggest that you haven't run vacuum analyze on
> all of your tables.

No; the 100000000.00 is a tipoff that he's set enable_seqscan off, but
the system is using a seqscan anyway because it cannot find any other
plan.

"SET enable_seqscan = off" does not prevent the planner from generating
seqscan plans, it just adds 100000000.00 to the cost estimate.  That
will generally cause the planner to pick another plan --- if it can find
one.  In this case it evidently cannot find any indexscan alternative.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: MOVE LAST: why?
Next
From: Hiroshi Inoue
Date:
Subject: Re: MOVE LAST: why?