Re: Forcing query to use an index

Поиск
Список
Период
Сортировка
От Michael Nachbaur
Тема Re: Forcing query to use an index
Дата
Msg-id 0E014EA3-4DC8-11D7-90E0-000A27935D5A@nachbaur.com
обсуждение исходный текст
Ответ на Re: Forcing query to use an index  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: Michael Nachbaur
Дата:
Сообщение: Re: Forcing query to use an index
Следующее
От: Michael Nachbaur
Дата:
Сообщение: Re: Forcing query to use an index