更新时间:2024-12-30 GMT+08:00
执行计划
以如下SQL语句为例:
1
|
SELECT * FROM t1, t2 WHERE t1.c1 = t2.c2; |
执行EXPLAIN的输出为:
gaussdb=# EXPLAIN SELECT * FROM t1,t2 WHERE t1.c1 = t2.c2;
QUERY PLAN
-------------------------------------------------------------------
Hash Join (cost=23.73..341.30 rows=16217 width=180)
Hash Cond: (t1.c1 = t2.c2)
-> Seq Scan on t1 (cost=0.00..122.17 rows=5317 width=76)
-> Hash (cost=16.10..16.10 rows=610 width=104)
-> Seq Scan on t2 (cost=0.00..16.10 rows=610 width=104)
(5 rows)
执行计划层级解读(纵向):
父主题: 执行计划详解