postgres=# create table t1 (c1 int, c2 int, c3 int) distribute by hash(c1);
CREATE TABLE
postgres=# explain verbose select * from t1 where c1=1 and c2=1 and c3=1;
QUERY PLAN
Data Node Scan on "REMOTE_FQS_QUERY" (cost=0.00..0.00 rows=0 width=0)
Output: t1.c1, t1.c2, t1.c3
Node/s: datanode1, datanode2
Remote query: SELECT c1, c2, c3 FROM benchmarksql.t1 WHERE (((c1 = 1) AND (c2 = 1)) AND (c3 = 1))
(4 rows)
postgres=# explain verbose select * from t1 where c2=1 and c3=1 and c1=1;
QUERY PLAN
Data Node Scan on "REMOTE_FQS_QUERY" (cost=0.00..0.00 rows=0 width=0)
Output: t1.c1, t1.c2, t1.c3
Node/s: datanode1
Remote query: SELECT c1, c2, c3 FROM benchmarksql.t1 WHERE (((c2 = 1) AND (c3 = 1)) AND (c1 = 1))
(4 rows)
I fix it as the attached file, please review.
Last edit: Julian ZL Zhang 2014-01-06