Re: Query across a date range

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: David Jaquay <djaquay(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query across a date range
Date: 2005-01-07 19:35:11
Message-ID: 200501071135.11229.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

David,

> The problem: Doing a query for a date range on a particular store or
> market, though, for a date range of more than a few days does a
> sequential scan of sales_tickets, and performs worse than doing one
> single date query for each date.  My 'explain' for one such query is
> below.

Can you run EXPLAIN ANALYZE instead of just EXPLAIN? That will show you the
discrepancy between estimated and actual costs, and probably show you what
needs fixing.

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Jaquay 2005-01-07 20:04:28 Re: Query across a date range
Previous Message Tom Lane 2005-01-07 19:35:04 Re: Query across a date range