Re: Query performance issue

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Query performance issue
Дата
Msg-id CAHOFxGqM3Gzmp0Ho0oftpBY99aq0+B+gZT+emy6scLRc5LZc3g@mail.gmail.com
обсуждение исходный текст
Ответ на Query performance issue  (Nagaraj Raj <nagaraj.sf@yahoo.com>)
Список pgsql-performance
What indexes exist on those tables? How many rows do you expect to get back in total? Is the last_contacted_anychannel_dttm clause restrictive, or does that include most of the prospect table (check pg_stats for the histogram if you don't know).

and (a."shared_paddr_with_customer_ind" = 'N') 
               and (a."profane_wrd_ind" = 'N') 
               and (a."tmo_ofnsv_name_ind" = 'N')
                   and (a."has_individual_address" = 'Y') 
               and (a."has_last_name" = 'Y') 
       and (a."has_first_name" = 'Y'))

Are these conditions expected to throw out very few rows, or most of the table?

If you change both joins to EXISTS clauses, do you get the same plan when you run explain?

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

Предыдущее
От: Dane Foster
Дата:
Сообщение: Re: Slow query and wrong row estimates for CTE
Следующее
От: Dane Foster
Дата:
Сообщение: Re: Slow query and wrong row estimates for CTE