Re: Subquery flattening causing sequential scan

Поиск
Список
Период
Сортировка
От Віталій Тимчишин
Тема Re: Subquery flattening causing sequential scan
Дата
Msg-id CABWW-d2s=7A1SZz85vW_SYvLvWO2U54xc7DxwC_bo=saCitNLQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Subquery flattening causing sequential scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance

'
27.12.2011 20:13 пользователь "Tom Lane" <tgl@sss.pgh.pa.us> написал:
>
> Jim Crate <jimcfl@gmail.com> writes:
> > My question is why does it do a seq scan when it flattens this
> > subquery into a JOIN?
>
> Because it thinks there will be 3783 rows out of the msg scan, which if
> true would make your desired nestloop join a serious loser.  

But second plan is evaluated cheapier by analyze. I thought this should make it being used unless it is not evaluated. Can it be collapse limit problem or like?

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Subquery flattening causing sequential scan
Следующее
От: Matteo Beccati
Дата:
Сообщение: Re: PostgreSQL 9.0.4 blocking in lseek?