更新时间:2025-03-13 GMT+08:00
Remote query
算子说明
当SQL语句不能下推时,也不能生成分布式执行计划时,会生成发送语句的执行计划。使用EXPLAIN VERBOSE能看到下发到DN的SQL语句
典型场景
SQL语句不能下推时,也不能生成分布式执行计划。
示例
--环境准备。 gaussdb=# CREATE TABLE t1(c1 int,c2 int); gaussdb=# EXPLAIN VERBOSE SELECT * FROM t1 limit 1; QUERY PLAN ------------------------------------------------------------------------------------ Limit (cost=0.00..0.00 rows=1 width=8) Output: t1.c1, t1.c2 -> Data Node Scan on "__REMOTE_LIMIT_QUERY__" (cost=0.00..0.00 rows=1 width=8) Output: t1.c1, t1.c2 Node/s: All datanodes Remote query: SELECT c1, c2 FROM ONLY public.t1 WHERE true LIMIT 1::bigint (6 rows) --删除。 gaussdb=# DROP TABLE t1;
父主题: 分布式运算符