explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4ws2

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

GroupAggregate (cost=357,697.01..358,340.39 rows=2,406 width=40) (actual time=1,327.561..1,327.576 rows=2 loops=1)

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

Gather Merge (cost=357,697.01..358,236.88 rows=3,950 width=72) (actual time=1,326.929..1,329.399 rows=6 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.067 1,323.362 ↑ 987.5 2 3 / 3

GroupAggregate (cost=356,696.99..356,780.92 rows=1,975 width=72) (actual time=1,322.788..1,323.362 rows=2 loops=3)

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

Sort (cost=356,696.99..356,701.92 rows=1,975 width=46) (actual time=1,322.178..1,322.295 rows=1,601 loops=3)

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

Hash Join (cost=305,399.96..356,588.88 rows=1,975 width=46) (actual time=1,047.772..1,321.373 rows=1,601 loops=3)

6. 1.097 1,320.450 ↑ 1.2 1,601 3 / 3

Hash Join (cost=305,398.39..356,550.28 rows=1,975 width=20) (actual time=1,047.727..1,320.45 rows=1,601 loops=3)

7. 16.840 1,309.573 ↑ 1.2 1,601 3 / 3

Hash Join (cost=304,505.39..355,630.13 rows=1,975 width=20) (actual time=1,037.856..1,309.573 rows=1,601 loops=3)

8. 3.317 255.528 ↑ 1.2 60,964 3 / 3

Nested Loop (cost=2.96..50,840.78 rows=74,316 width=8) (actual time=0.121..255.528 rows=60,964 loops=3)

9. 16.795 31.239 ↑ 1.2 20,088 3 / 3

Hash Join (cost=2.53..9,140.28 rows=25,000 width=4) (actual time=0.09..31.239 rows=20,088 loops=3)

10. 14.383 14.383 ↑ 1.2 100,000 3 / 3

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

11. 0.006 0.061 ↑ 1.0 5 3 / 3

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

12. 0.021 0.055 ↑ 1.0 5 3 / 3

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

13. 0.007 0.007 ↑ 1.0 25 3 / 3

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

14. 0.008 0.027 ↑ 1.0 1 3 / 3

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

15. 0.019 0.019 ↑ 1.0 1 3 / 3

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

  • Filter: (r_name = 'EUROPE'::bpchar)
16. 220.972 220.972 ↑ 1.7 3 60,265 / 3

Index Scan using orders_key on orders orders (cost=0.43..1.62 rows=5 width=12) (actual time=0.004..0.011 rows=3 loops=60,265)

  • Index Cond: (o_custkey = customer.c_custkey)
  • Filter: ((o_orderdate >= '1995-01-01'::date) AND (o_orderdate <= '1996-12-31'::date))
17. 10.241 1,037.205 ↑ 1.3 26,384 3 / 3

Hash (cost=304,087.18..304,087.18 rows=33,220 width=20) (actual time=1,037.205..1,037.205 rows=26,384 loops=3)

18. 641.887 1,026.964 ↑ 1.3 26,384 3 / 3

Hash Join (cost=10,290.18..304,087.18 rows=33,220 width=20) (actual time=19.477..1,026.964 rows=26,384 loops=3)

19. 365.750 365.750 ↑ 1.2 3,999,332 3 / 3

Seq Scan on lineitem lineitem (cost=0..274,911.65 rows=4,999,165 width=24) (actual time=0.004..365.75 rows=3,999,332 loops=3)

20. 0.215 19.327 ↑ 1.3 877 3 / 3

Hash (cost=10,276.33..10,276.33 rows=1,108 width=4) (actual time=19.327..19.327 rows=877 loops=3)

21. 19.112 19.112 ↑ 1.3 877 3 / 3

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

  • Filter: ((p_type)::text = 'ECONOMY POLISHED STEEL'::text)
22. 5.385 9.780 ↑ 1.0 20,000 3 / 3

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

23. 4.395 4.395 ↑ 1.0 20,000 3 / 3

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

24. 0.007 0.019 ↑ 1.0 25 3 / 3

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

25. 0.012 0.012 ↑ 1.0 25 3 / 3

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

Planning time : 0.933 ms
Execution time : 1,329.517 ms