EXPLAIN ANALYZE output weird for Top-N Sort
От | Simon Riggs |
---|---|
Тема | EXPLAIN ANALYZE output weird for Top-N Sort |
Дата | |
Msg-id | CA+U5nMJyQjudpRoQ7+scT70gYd1osdkBh=pfyG3awmz6n7qXDA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: EXPLAIN ANALYZE output weird for Top-N Sort
Re: EXPLAIN ANALYZE output weird for Top-N Sort |
Список | pgsql-hackers |
Limit (cost=.... rows=20 width=175) (actual time=.... rows=20 loops=1) -> Sort (cost=.... rows=568733 width=175) (actualtime=.... rows=20 loops=1) Sort Method: top-N heapsort The Sort estimate shows 568733 rows, whereas the actual rows are 20. Both are correct, in a way. The node feeding the Sort shows an actual of 379114 rows. If we are looking at rows returned, then the Sort node estimate should say 20 If we are looking at rows processed, then the Sort node should have actual rows=379114 I think we should say the latter; i,e, the Sort node should report 379114 rows, not 20 rows. Thoughts? -- Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: