explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CYaR

Settings
# exclusive inclusive rows x rows loops node
1. 0.045 8,307.511 ↑ 34.0 5 1

Sort (cost=61,761.50..61,761.93 rows=170 width=116) (actual time=8,307.510..8,307.511 rows=5 loops=1)

  • Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=126689 read=92575
2. 26.386 8,307.466 ↑ 34.0 5 1

HashAggregate (cost=61,753.08..61,755.20 rows=170 width=116) (actual time=8,307.462..8,307.466 rows=5 loops=1)

  • Group Key: nation.n_name
  • Buffers: shared hit=126689 read=92572
3. 87.135 8,281.080 ↓ 34.5 7,243 1

Hash Join (cost=6,270.21..61,750.98 rows=210 width=116) (actual time=71.987..8,281.080 rows=7,243 loops=1)

  • Hash Cond: ((lineitem.l_suppkey = supplier.s_suppkey) AND (customer.c_nationkey = supplier.s_nationkey))
  • Buffers: shared hit=126689 read=92572
4. 109.103 8,189.032 ↓ 35.0 184,082 1

Nested Loop (cost=5,790.21..61,229.44 rows=5,258 width=136) (actual time=66.993..8,189.032 rows=184,082 loops=1)

  • Buffers: shared hit=126683 read=92342
5. 125.368 810.665 ↓ 35.0 46,008 1

Hash Join (cost=5,789.78..56,712.82 rows=1,314 width=120) (actual time=66.928..810.665 rows=46,008 loops=1)

  • Hash Cond: (orders.o_custkey = customer.c_custkey)
  • Buffers: shared hit=1 read=31267
6. 618.400 618.400 ↓ 1.0 227,597 1

Seq Scan on orders (cost=0.00..50,072.00 rows=223,440 width=12) (actual time=0.007..618.400 rows=227,597 loops=1)

  • Filter: ((o_orderdate >= '1994-01-01'::date) AND (o_orderdate < '1995-01-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 1272403
  • Buffers: shared hit=1 read=27571
7. 7.606 66.897 ↓ 34.2 30,183 1

Hash (cost=5,778.76..5,778.76 rows=882 width=120) (actual time=66.897..66.897 rows=30,183 loops=1)

  • Buckets: 32768 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2615kB
  • Buffers: shared read=3696
8. 22.935 59.291 ↓ 34.2 30,183 1

Hash Join (cost=13.43..5,778.76 rows=882 width=120) (actual time=0.047..59.291 rows=30,183 loops=1)

  • Hash Cond: (customer.c_nationkey = nation.n_nationkey)
  • Buffers: shared read=3696
9. 36.324 36.324 ↑ 1.0 150,000 1

Seq Scan on customer (cost=0.00..5,194.00 rows=150,000 width=12) (actual time=0.005..36.324 rows=150,000 loops=1)

  • Buffers: shared read=3694
10. 0.004 0.032 ↓ 5.0 5 1

Hash (cost=13.42..13.42 rows=1 width=108) (actual time=0.032..0.032 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=2
11. 0.011 0.028 ↓ 5.0 5 1

Hash Join (cost=1.07..13.42 rows=1 width=108) (actual time=0.025..0.028 rows=5 loops=1)

  • Hash Cond: (nation.n_regionkey = region.r_regionkey)
  • Buffers: shared read=2
12. 0.006 0.006 ↑ 6.8 25 1

Seq Scan on nation (cost=0.00..11.70 rows=170 width=116) (actual time=0.005..0.006 rows=25 loops=1)

  • Buffers: shared read=1
13. 0.004 0.011 ↑ 1.0 1 1

Hash (cost=1.06..1.06 rows=1 width=4) (actual time=0.011..0.011 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=1
14. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on region (cost=0.00..1.06 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: (r_name = 'ASIA'::bpchar)
  • Rows Removed by Filter: 4
  • Buffers: shared read=1
15. 7,269.264 7,269.264 ↑ 4.2 4 46,008

Index Scan using lineitem_pkey on lineitem (cost=0.43..3.27 rows=17 width=28) (actual time=0.149..0.158 rows=4 loops=46,008)

  • Index Cond: (l_orderkey = orders.o_orderkey)
  • Buffers: shared hit=126682 read=61075
16. 1.818 4.913 ↑ 1.0 10,000 1

Hash (cost=330.00..330.00 rows=10,000 width=12) (actual time=4.913..4.913 rows=10,000 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 597kB
  • Buffers: shared read=230
17. 3.095 3.095 ↑ 1.0 10,000 1

Seq Scan on supplier (cost=0.00..330.00 rows=10,000 width=12) (actual time=0.006..3.095 rows=10,000 loops=1)

  • Buffers: shared read=230