From: Aaron Held <aaron@metrony.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Performance w/ multiple WHERE clauses
Date: Wed, 18 Sep 2002 17:17:48 -0400
Message-ID: <007401c25f58$da559dc0$6220010a@metrony.com> (raw)
References: <5.1.1.6.2.20020918111926.00a82058@mail.nashlinux.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: aaron@metrony.com
Subject: Re: Performance w/ multiple WHERE clauses
In-Reply-To: <007401c25f58$da559dc0$6220010a@metrony.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox