Re: Select time jump after adding filter; please help me figure out what I'm doing wrong.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Andrew Edson <cheighlund(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Select time jump after adding filter; please help me figure out what I'm doing wrong.
Date: 2007-08-14 17:41:29
Message-ID: 46C1E949.5010708@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrew Edson wrote:
> The following is a copy of my index creation statement, index name, and explain and explain analyze output on the statement I was trying to run. Would someone please help me figure out what I'm doing wrong here?
>
> > attest=# create index ptrans_cid_trandt_idx on ptrans(cntrct_id, tran_dt) where rcrd_cd = '0A';

>> attest=# explain select cntrct_id, tran_dt from ptrans where rcrd_cd = 0;

>> attest=# explain analyze select cntrct_id, tran_dt from ptrans where rcrd_cd = 0;

The index has a where clause that doesn't match your query. It wouldn't
use the index anyway - you're not filtering or sorting on it.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Phoenix Kiula 2007-08-14 17:46:34 Re: Moving to postgresql and some ignorant questions
Previous Message Phoenix Kiula 2007-08-14 17:27:36 Re: Moving to postgresql and some ignorant questions