postgres_fdw does not push down DISTINCT
От
Christophe Pettus
Тема
postgres_fdw does not push down DISTINCT
Дата
Msg-id
9EE5AAB4-36FC-4FF0-9B0E-CF7B5221D8D1@thebuild.com
Список
While working on a different FDW, I discovered that postgres_fdw doesn't push a DISTINCT clause to the foreign server, unless it's part of an aggregate function:
k=# explain verbose select distinct i from tf;
QUERY PLAN
--------------------------------------------------------------------------
HashAggregate (cost=193.20..195.20 rows=200 width=8)
Output: i
Group Key: tf.i
-> Foreign Scan on public.tf (cost=100.00..186.80 rows=2560 width=8)
Output: i, f
Remote SQL: SELECT i FROM public.tf
(6 rows)
Of course, the same effect can be achieved with GROUP BY, but I'm curious why it doesn't push it down?
В списке pgsql-general по дате отправления
От: Bryn Llewellyn
Дата:
От: David G. Johnston
Дата: