Re: Problem query

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Problem query
Дата
Msg-id 4DE74E06020000250003DFE6@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Problem query  (CS DBA <cs_dba@consistentstate.com>)
Ответы Re: Problem query
Список pgsql-performance
CS DBA <cs_dba@consistentstate.com> wrote:
> On 06/01/2011 03:38 PM, Kevin Grittner wrote:

>> select count(*) from
>>    (select distinct max(pri_num)
>>    from max_xtrv_st_t
>>    group by tds_cx_ind, cxs_ind_2) x

> I've tried a number of alternates, each one wants to do a seq scan
> of the table (including your suggestion above).

Is there some reason to believe that a sequential scan isn't the
fastest way to get the data?  When generating summary data like
this, it often is faster than lots of random access.  If you can
coerce it into a faster plan by turning off enable_seqscan on the
connection before running the query, then we can look at how you
might adjust your costing parameters to get better plans.

-Kevin

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

Предыдущее
От: Jenish
Дата:
Сообщение: Re: Strange behavior of child table.
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Understanding Hash Join performance