Re: sort operation leads planner to different number of rows?
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: sort operation leads planner to different number of rows? |
| Дата | |
| Msg-id | 28515.1137015565@sss.pgh.pa.us обсуждение |
| Ответ на | sort operation leads planner to different number of rows? (Robert Treat <xzilla@users.sourceforge.net>) |
| Список | pgsql-hackers |
Robert Treat <xzilla@users.sourceforge.net> writes:
> Sort (cost=616.64..620.56 rows=1568 width=12) (actual time=46.579..54.641 rows=6407 loops=1)
> Sort Key: latest_download.host_id
> -> Subquery Scan latest_download (cost=498.14..533.42 rows=1568 width=12) (actual time=43.657..45.594
rows=472loops=1)
> I am wondering why it would end up with a different number of rows after
> the sort operation.
The planner's estimate didn't change: 1568 at both steps. The "actual"
is the number of rows actually pulled from the node at runtime, and the
discrepancy here occurs because this is the inner side of a mergejoin.
mergejoin has to rescan duplicate inner rows to join them to duplicate
outer rows. It looks like you have a pretty fair number of
duplicates...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера