Performance w/ multiple WHERE clauses

From: "Aaron Held" <aaron(at)metrony(dot)com>
To: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Performance w/ multiple WHERE clauses
Date: 2002-09-18 21:17:48
Message-ID: 007401c25f58$da559dc0$6220010a@metrony.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am running into a serious performance issue with some basic queries.

If I run something like

select * from "Calls" WHERE
( ("CallType" = 'LONG DIST' ))

The search takes about 15 seconds

if I run
select * from "Calls" WHERE
( ( "DateOfCall"='06/19/02') )
AND ( ( "CallType" = 'LONG DIST' ))
[DateOfCall is a DateTime field]

it takes 15 minutes!

both columns are indexed individually and expalain reports and Index scan for both
queries.

Any pointers where to look next?

Running pg 7.2 on RH

Thanks,
-Aaron Held

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-09-18 21:58:56 Re: Performance w/ multiple WHERE clauses
Previous Message Jeff Boes 2002-09-18 19:56:08 Query to evaluate space used