Re: Query across a date range - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Query across a date range
Date
Msg-id 200501071135.11229.josh@agliodbs.com
Whole thread Raw
In response to Query across a date range  (David Jaquay <djaquay@gmail.com>)
Responses Re: Query across a date range
List 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

pgsql-performance by date:

Previous
From: David Jaquay
Date:
Subject: Query across a date range
Next
From: Tom Lane
Date:
Subject: Re: Query across a date range