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

From Richard Huxton
Subject Re: Select time jump after adding filter; please help me figure out what I'm doing wrong.
Date
Msg-id 46C1E949.5010708@archonet.com
Whole thread Raw
In response to Select time jump after adding filter; please help me figure out what I'm doing wrong.  (Andrew Edson <cheighlund@yahoo.com>)
List 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
statementI 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

pgsql-general by date:

Previous
From: "Phoenix Kiula"
Date:
Subject: Re: Moving to postgresql and some ignorant questions
Next
From: "Phoenix Kiula"
Date:
Subject: Re: Moving to postgresql and some ignorant questions