From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Sam Liddicott" <sam(dot)liddicott(at)ananova(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: 7.2.1 optimises very badly against 7.2 |
Date: | 2002-07-10 14:00:38 |
Message-ID: | 16800.1026309638@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Sam Liddicott" <sam(dot)liddicott(at)ananova(dot)com> writes:
> But I feel where indexes are used and seq_scan *could* have been used,
> seq_scan is only slightly faster where the machine is idle (and the small
> delay can perhaps be afforded), but where there there is disk head
> contention seq_scan is deadly, thus I always prefer index scan, so I shall
> disable seq_scan in the config file. Is my reasoning faulty?
Quite. If we could get by with a rule as simplistic as "never use a
seqscan if you can avoid it" then the planner could be a lot simpler.
Your real gripe is that the planner is overestimating the costs of
indexscans relative to seqscans; that would be more appropriately
addressed by lowering random_page_cost a little than by getting out
the sledgehammer.
A more practical reason not to do that is that in situations where a
seqscan is not avoidable, enable_seq_scan = OFF is likely to cause the
planner to make bad choices, since the disable cost will swamp out all
the actually-useful cost judgments.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Lamar Owen | 2002-07-10 14:12:11 | Re: (A) native Windows port |
Previous Message | Lamar Owen | 2002-07-10 13:57:18 | Re: I am being interviewed by OReilly |