Re: trouble with (lack of) indexing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <scott(dot)marlowe(at)ihs(dot)com>
Cc: Søren Boll Overgaard <postgres(at)fork(dot)dk>, pgsql-general(at)postgresql(dot)org
Subject: Re: trouble with (lack of) indexing
Date: 2002-05-10 17:00:56
Message-ID: 29295.1021050056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe <scott(dot)marlowe(at)ihs(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message shey sewani 2002-05-10 18:56:00 General Question About Indexes
Previous Message Tom Lane 2002-05-10 16:39:56 Re: Subject: bool / vacuum full bug followup part 2