Performance w/ multiple WHERE clauses - Mailing list pgsql-sql

From Aaron Held
Subject Performance w/ multiple WHERE clauses
Date
Msg-id 007401c25f58$da559dc0$6220010a@metrony.com
Whole thread Raw
In response to Creating a field that uses totals other fields?  (Sloan Bowman <smileyq@nashlinux.com>)
Responses Re: Performance w/ multiple WHERE clauses
List 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' ))
[DateOfCallis 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



pgsql-sql by date:

Previous
From: Jeff Boes
Date:
Subject: Query to evaluate space used
Next
From: Stephan Szabo
Date:
Subject: Re: Performance w/ multiple WHERE clauses