Re: Forcing query to use an index - Mailing list pgsql-sql

From Michael Nachbaur
Subject Re: Forcing query to use an index
Date
Msg-id 0E014EA3-4DC8-11D7-90E0-000A27935D5A@nachbaur.com
Whole thread Raw
In response to Re: Forcing query to use an index  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-sql
On Monday, Mar 3, 2003, at 14:09 US/Pacific, Stephan Szabo wrote:
> If you're hitting all the rows in the table, there's only disadvantage
> to using an indexscan (right now, given the way data is stored).  If 
> you
> were returning some fraction of the rows postgresql should hopefully
> switch to a different plan (depending on the estimated costs).

I should only ever get one match per record.  This is the structure of 
the relevant tables:

Customer  --> Customer_Month_Summary   ^   |
EmailAddress

There is one Customer_Month_Summary record per-customer-per-month, so I 
should only get one record out of the database.  Additionally, since 
there are about 2000 customer records, but multiple months in the 
summary table, I'll never use the entire results of the summary table 
in one query.



pgsql-sql by date:

Previous
From: Michael Nachbaur
Date:
Subject: Re: Forcing query to use an index
Next
From: Michael Nachbaur
Date:
Subject: Re: Forcing query to use an index