Re: Index not being used

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Ralph Smith" <smithrn(at)u(dot)washington(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Index not being used
Date: 2007-08-14 02:09:51
Message-ID: dcc563d10708131909i31c0406dobb42523c9157d8e6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oh, and you can use the sledge hammer of tuning by using the

set enable_xxx = off

settings for the planner. It's not a normal way to tune most queries,
but it certainly can let you know if the problem is using the index or
not.

psql mydb
\timing
select count(*) from table where field > 12345;
set enable_seqscan=off;
select count(*) from table where field > 12345;

and compare them. run each a few times, since the cache will affect
the performance.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-08-14 02:29:23 Re: Index not being used
Previous Message Scott Marlowe 2007-08-14 02:07:20 Re: Index not being used