| От | Tom Lane |
|---|---|
| Тема | Re: Specifying many rows in a table |
| Дата | |
| Msg-id | 9681.1075340027@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Specifying many rows in a table (Steve Atkins <steve@blighty.com>) |
| Список | pgsql-general |
Steve Atkins <steve@blighty.com> writes:
> An interesting thing, though is that for 10,000,000 rows in big and
> one row in little, everything indexed and analyzed an exists query
> is painfully bad...
> select * from big where exists (select 1 from little where s=big.id)
> ...expands to nested seqscans over big and little, rather than the
> seqscan over little with a nested index scan over big I was expecting.
The planner can figure this out for straight join and (as of 7.4) for
IN, but not for EXISTS(). I've forgotten the details, but there were
some semantic fine points that discouraged me from trying to tackle the
EXISTS() case at the same time as IN.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера