Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism
| От | Peter Geoghegan |
|---|---|
| Тема | Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism |
| Дата | |
| Msg-id | CAH2-Wzn8pd4_QeYO4nLMHsY4xGAsEQBy4X-e-rj_jfUD2XuU2g@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Top-N sorts in EXPLAIN, row count estimates, and parallelism
|
| Список | pgsql-hackers |
On Thu, May 23, 2019 at 3:31 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Given the way that's implemented, I doubt that we can report it > reliably in EXPLAIN. Does it have to be totally reliable? cost_sort() costs sorts as top-N heapsorts. While we cannot make an iron-clad guarantee that it will work out that way from within tuplesort.c, that doesn't seem like it closes off the possibility of more informative EXPLAIN output. For example, can't we at report that the tuplesort will be "bounded" within EXPLAIN, indicating that we intend to attempt to sort using a top-N heap sort (i.e. we'll definitely do it that way if there is sufficient work_mem)? -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: