Re: trouble with (lack of) indexing - Mailing list pgsql-general

From Tom Lane
Subject Re: trouble with (lack of) indexing
Date
Msg-id 29295.1021050056@sss.pgh.pa.us
Whole thread Raw
In response to Re: trouble with (lack of) indexing  (Scott Marlowe <scott.marlowe@ihs.com>)
List pgsql-general
Scott Marlowe <scott.marlowe@ihs.com> writes:
> You can change the setting of enable_seqscan and enable_indexscan to force
> your planner to ignore one or the other, and time the output.  It's pretty
> easy to do a quick timing test like so:

> time psql -c 'set enable_seqscan=off;select * from tellers' >/dev/null

It's difficult to get accurate measurements that way.  I'd recommend
using 7.2's EXPLAIN ANALYZE instead, and looking at the total runtime
it displays.

Even with EXPLAIN ANALYZE, I'd recommend repeating the command a couple
of times to see how much the runtime varies before you trust the results
very far.  Disk caching can cause the second execution to take far less
time than the first, even with the identical plan.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Subject: bool / vacuum full bug followup part 2
Next
From: "shey sewani"
Date:
Subject: General Question About Indexes