Search Postgresql Archives

postgres_fdw does not push down DISTINCT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux