Yet another indexing issue.

From: "David Siebert" <david(at)eclipsecat(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Yet another indexing issue.
Date: 2002-03-19 18:40:51
Message-ID: OJEIJALIHAIBMMBFLCOBAENOEDAA.david@eclipsecat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql


I am having issues with an Index.
Here is the query

SELECT * FROM phonecalls WHERE istatus = 0 AND (sfor = 'pat' OR
sfor='TECHIES') ORDER BY ipri DESC, dplaceddate;
I have tried '0' and jut plain 0 as well as type casting it with ::int4 .

Here is the index I think it should use.

CREATE INDEX phonecallspoll ON phonecalls USING btree (sfor varchar_ops,
istatus int4_ops);
But it is still doing a scan?

Any suggestions?
yes I have used Vacumme with the anylise option.
Thanks for any info.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew G. Hammond 2002-03-19 18:41:09 Re: [SQL] How to create crude report with psql and/or plpgsql
Previous Message Jean-Luc Lachance 2002-03-19 18:33:13 Re: [SQL] How to create crude report with psql and/or plpgsql

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew G. Hammond 2002-03-19 18:41:09 Re: [SQL] How to create crude report with psql and/or plpgsql
Previous Message Jean-Luc Lachance 2002-03-19 18:33:13 Re: [SQL] How to create crude report with psql and/or plpgsql