Re: Limit and inherited tables
От | Tom Lane |
---|---|
Тема | Re: Limit and inherited tables |
Дата | |
Msg-id | 21490.1452875432@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Limit and inherited tables (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>) |
Список | pgsql-hackers |
Konstantin Knizhnik <k.knizhnik@postgrespro.ru> writes: >> This example is lacking indexes on the child tables, which is >> why the plan shown is about as good as you're going to get. >> The contents of foo1 and foo2 have to be read in entirety in any >> case, and sorting them separately is not a win compared to doing >> a single sort. > It is true, but not in case of FDW connected to remote host. > In this case sending large volumes of data through network will be very > inefficient. If the FDW isn't providing a sorted path, there is no way to improve the situation much. You can't just "push the LIMIT", you'd have to push "ORDER BY ... LIMIT", which will mean that a sort has to happen anyway. If the remote end can do a fast-start sort efficiently, it should report that, and then a merge-append plan is just fine. regards, tom lane
В списке pgsql-hackers по дате отправления: