-> Partial Aggregate (cost=96389.55..96389.56 rows=1 width=8) (actual time=379.597..379.597 rows=1 loops=3) -> Parallel Seq Scan on people (cost=0.00..96382.26 rows=2917 width=0) (actual time=378.831..379.341 rows=3333 loops=3) Filter: (atpgconn2018 = 'Y'::bpchar) Rows Removed by...
(actual time=0.167..5.289 rows=8555 loops=1)表明了这个节点的真实执行信息。 Filter: (found_time > '2000-02-03'::date) 表明了Seq Scan 节点之上的Filter 操作,即全表扫描时对每行记录进行过滤操作。 Rows Removed by Filter表明过滤操作过滤了多少行记录。 Planning time表明生成查询计划的时间。 Executio...
-> Parallel Seq Scan on lineitem (cost=0.00..1312000.57 rows=14708428 width=5) (actual time=1.491..29217.070 rows=11767943 loop s=5) Filter: (l_shipdate <= '1998-08-18 00:00:00'::timestamp without time zone) Rows Removed by Filter: 229267 Planning Time: 0.666 ms Execution Time: 31...
Rows Removed by Filter: 1146337Planning Time: 6.637 msExecution Time: 41297.038 ms(5 rows)# 顺序扫描产生太多没有聚合的行。因此,查询由一个CPU核执行。Parallel sequential scan· 并行查询tpch=# explain analyze select sum(l_quantity) as sum_qty from lineitem where l_shipdate <= date '1998-12-...
Rows Removed by Filter: 1146337 Planning Time: 6.637 ms Execution Time: 41297.038 ms (5 rows) # 顺序扫描产生太多没有聚合的行。因此,查询由一个CPU核执行。 Parallel sequential scan · 并行查询 tpch=# explain analyze select sum(l_quantity) as sum_qty from lineitem where l_shipdate <= date ...
Filter: (stringu1 = 'xxx'::name) -> Bitmap Index Scan on tenk1_unique1 (cost=0.00..5.04 rows=101 width=0) Index Cond: (unique1 < 100) 增加的条件stringu1='xxx'减少了输出记录数的评估,但没有减少时间消耗,应为系统还是要查询相同数量的记录。请注意stringu1不是索引条件。
Filter: (aid > 10000000) Rows Removed by Filter: 10000000 Planning time: 0.161 ms Execution time: 18394.457 ms (12 rows) 明显两次查询的结果是不一致的,使用索引和不使用索引的结果是不同的. 这已经能证明索引出了问题. 当然可以通过 pg_catcheck 来进行系统的数据的完整性的检查. ...
Rows Removed by Filter: 114 Planning Time: 1.267 ms Execution Time: 61097.876 ms 仔细观察执行计划后发现,占用时间最多的在第2行Nested Loop(actual time=8.702…61097.110),嵌套循环占用了一分钟,然后在16 -> 20行看到(loops=245603),循环了24.5万次。
Filter: (t.rn = 1) Rows Removed by Filter: 90863 Buffers: shared hit=40000, temp read=37391 written=37391 -> WindowAgg (cost=423098.84..445598.84 rows=1000000 width=300) (actual time=1715.276..3345.392 rows=1000000 loops=1) Output: row_number() OVER (?), tbl_dup.id, tbl_dup.sid,...
Filter:(b.c1=1)(10rows) 第二种形如: SELECT ... FROM a LEFT JOIN b ON (a.x = b.y) WHERE b.y IS NULL; 这种语句如满足条件可以变换为反半连接(ANTI-SEMIJOIN). 过滤条件已明确要求Nullable-Side端y IS NULL,如果连接条件是a.x = b.y这类严格(strict)的条件,那么这样的外连接与反半连接...