pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Aaron Held <aaron@metrony.com>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Performance w/ multiple WHERE clauses
Date: Wed, 18 Sep 2002 14:58:56 -0700 (PDT)
Message-ID: <20020918145825.X19535-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <007401c25f58$da559dc0$6220010a@metrony.com>

On Wed, 18 Sep 2002, Aaron Held wrote:

> 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?

Are they using the same index? Have you done analyze
recently?





view thread (6+ messages)  latest in thread

Message-ID: <20020918145825.X19535-100000@megazone23.bigpanda.com>
Permalink:  ../20020918145825.X19535-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020918145825.X19535-100000@megazone23.bigpanda.com

 · 

reply

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: sszabo@megazone23.bigpanda.com, aaron@metrony.com
  Subject: Re: Performance w/ multiple WHERE clauses
  In-Reply-To: <20020918145825.X19535-100000@megazone23.bigpanda.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