explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SX43

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 205.866 ↑ 1,203.0 2 1

GroupAggregate (cost=162,472.66..163,116.03 rows=2,406 width=40) (actual time=205.86..205.866 rows=2 loops=1)

  • Group Key: (date_part('year'::text, (orders.o_orderdate)::timestamp without time zone))
2. 3.950 207.109 ↑ 658.3 6 1

Gather Merge (cost=162,472.66..163,012.52 rows=3,950 width=72) (actual time=205.244..207.109 rows=6 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.051 203.159 ↑ 987.5 2 3 / 3

GroupAggregate (cost=161,472.63..161,556.57 rows=1,975 width=72) (actual time=202.597..203.159 rows=2 loops=3)

  • Group Key: (date_part('year'::text, (orders.o_orderdate)::timestamp without time zone))
4. 0.633 202.108 ↑ 1.2 1,601 3 / 3

Sort (cost=161,472.63..161,477.57 rows=1,975 width=46) (actual time=201.997..202.108 rows=1,601 loops=3)

  • Sort Key: (date_part('year'::text, (orders.o_orderdate)::timestamp without time zone))
  • Sort Method: quicksort Memory: 155kB
5. 0.647 201.475 ↑ 1.2 1,601 3 / 3

Hash Join (cost=152,314.66..161,364.53 rows=1,975 width=46) (actual time=166.827..201.475 rows=1,601 loops=3)

6. 0.942 200.808 ↑ 1.2 1,601 3 / 3

Hash Join (cost=152,313.09..161,325.93 rows=1,975 width=20) (actual time=166.779..200.808 rows=1,601 loops=3)

7. 0.997 191.928 ↑ 1.2 1,601 3 / 3

Hash Join (cost=151,420.09..160,405.78 rows=1,975 width=20) (actual time=158.745..191.928 rows=1,601 loops=3)

8. 18.579 190.881 ↑ 1.2 8,008 3 / 3

Hash Join (cost=151,417.56..160,346.46 rows=9,875 width=24) (actual time=158.594..190.881 rows=8,008 loops=3)

9. 13.834 13.834 ↑ 1.2 100,000 3 / 3

Seq Scan on customer customer (cost=0..8,419 rows=125,000 width=8) (actual time=0.011..13.834 rows=100,000 loops=3)

10. 3.359 158.468 ↑ 1.2 8,008 3 / 3

Hash (cost=151,294.13..151,294.13 rows=9,875 width=24) (actual time=158.468..158.468 rows=8,008 loops=3)

11. 0.000 155.109 ↑ 1.2 8,008 3 / 3

Nested Loop (cost=0.86..151,294.13 rows=9,875 width=24) (actual time=0.112..155.109 rows=8,008 loops=3)

12. 5.237 52.111 ↑ 1.3 26,384 3 / 3

Nested Loop (cost=0.43..135,260.78 rows=33,220 width=20) (actual time=0.065..52.111 rows=26,384 loops=3)

13. 20.554 20.554 ↑ 1.3 877 3 / 3

Seq Scan on part part (cost=0..10,276.33 rows=1,108 width=4) (actual time=0.046..20.554 rows=877 loops=3)

  • Filter: ((p_type)::text = 'ECONOMY POLISHED STEEL'::text)
14. 26.320 26.320 ↑ 1.1 30 2,632 / 3

Index Scan using lineitem_key on lineitem lineitem (cost=0.43..112.48 rows=32 width=24) (actual time=0.005..0.03 rows=30 loops=2,632)

  • Index Cond: (l_partkey = part.p_partkey)
15. 105.535 105.535 ↓ 0.0 0 79,151 / 3

Index Scan using orders_key_date on orders orders (cost=0.43..0.47 rows=1 width=12) (actual time=0.004..0.004 rows=0 loops=79,151)

  • Index Cond: ((o_orderkey = lineitem.l_orderkey) AND (o_orderdate >= '1995-01-01'::date) AND (o_orderdate <= '1996-12-31'::date))
16. 0.004 0.050 ↑ 1.0 5 3 / 3

Hash (cost=2.47..2.47 rows=5 width=4) (actual time=0.05..0.05 rows=5 loops=3)

17. 0.016 0.046 ↑ 1.0 5 3 / 3

Hash Join (cost=1.07..2.47 rows=5 width=4) (actual time=0.041..0.046 rows=5 loops=3)

18. 0.011 0.011 ↑ 1.0 25 3 / 3

Seq Scan on nation n1 (cost=0..1.25 rows=25 width=8) (actual time=0.009..0.011 rows=25 loops=3)

19. 0.003 0.019 ↑ 1.0 1 3 / 3

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

20. 0.016 0.016 ↑ 1.0 1 3 / 3

Seq Scan on region region (cost=0..1.06 rows=1 width=4) (actual time=0.016..0.016 rows=1 loops=3)

  • Filter: (r_name = 'EUROPE'::bpchar)
21. 3.756 7.938 ↑ 1.0 20,000 3 / 3

Hash (cost=643..643 rows=20,000 width=8) (actual time=7.938..7.938 rows=20,000 loops=3)

22. 4.182 4.182 ↑ 1.0 20,000 3 / 3

Seq Scan on supplier supplier (cost=0..643 rows=20,000 width=8) (actual time=0.007..4.182 rows=20,000 loops=3)

23. 0.007 0.020 ↑ 1.0 25 3 / 3

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.02..0.02 rows=25 loops=3)

24. 0.013 0.013 ↑ 1.0 25 3 / 3

Seq Scan on nation n2 (cost=0..1.25 rows=25 width=30) (actual time=0.009..0.013 rows=25 loops=3)

Planning time : 1.111 ms
Execution time : 207.227 ms