在完成对集合派生表的查询时,GBase 8s 执行若干步骤。
该操作被列为图 1 显示的 SET EXPLAIN 输出中的 SEQUENTIAL SCAN。
该操作被列为图 1 显示的 SET EXPLAIN 输出中的 COLLECTION SCAN。
图: 使用集合派生表的查询计划
QUERY: ------ SELECT name, id FROM (SELECT children FROM parents WHERE parents.id = 1001) c_table(name, id); Estimated Cost: 2 Estimated # of Rows Returned: 1 1) lsuto.c_table: COLLECTION SCAN Subquery: --------- Estimated Cost: 1 Estimated # of Rows Returned: 1 1) lsuto.parents: SEQUENTIAL SCAN Filters: lsuto.parents.id = 1001