Re: Factoring where clauses through UNIONS take 2

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Factoring where clauses through UNIONS take 2
Дата
Msg-id 20030424103054.F2131-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Factoring where clauses through UNIONS take 2  (Jonathan Bartlett <johnnyb@eskimo.com>)
Ответы Re: Factoring where clauses through UNIONS take 2  (Jonathan Bartlett <johnnyb@eskimo.com>)
Список pgsql-general
On Thu, 24 Apr 2003, Jonathan Bartlett wrote:

> Okay, after upgrading Postgres to 7.3.2, I got some improvements to my
> query through factoring, but it was obvious my tables needed a little
> help.  Therefore, I've modified my base tables and views, and now, even
> with enable_seqscan=off, it's not factoring through.  Here is my query:
>
> select * from all_actions where campaign = 3;
>
> The full query plan is at the end of the email.  Basically, all_actions is
> a view of several tables, each of which either have a field called
> "campaign" or "cached_campaign".  It is indexed for all affected tables.
> However, for every table it does a sequential scan rather than an indexed
> scan.  Any ideas on how to get it to at least attempt an indexed scan?

What does the actual view look like?  It seems to be pushing campaign=3
into a scan of campaign_sent_mails (although it's using a different index
on that).


В списке pgsql-general по дате отправления:

Предыдущее
От: "David Olbersen"
Дата:
Сообщение: ODBC & Access [Try 2]
Следующее
От: Jonathan Bartlett
Дата:
Сообщение: Re: Factoring where clauses through UNIONS take 2