explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T5Vv

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

GroupAggregate (cost=331,299.06..331,942.44 rows=2,406 width=40) (actual time=1,179.437..1,179.448 rows=2 loops=1)

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

Gather Merge (cost=331,299.06..331,838.93 rows=3,950 width=72) (actual time=1,178.82..1,181.016 rows=6 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.058 1,176.358 ↑ 987.5 2 3 / 3

GroupAggregate (cost=330,299.04..330,382.97 rows=1,975 width=72) (actual time=1,175.789..1,176.358 rows=2 loops=3)

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

Sort (cost=330,299.04..330,303.97 rows=1,975 width=46) (actual time=1,175.192..1,175.3 rows=1,601 loops=3)

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

Hash Join (cost=321,141.06..330,190.93 rows=1,975 width=46) (actual time=1,139.667..1,174.653 rows=1,601 loops=3)

6. 0.953 1,173.974 ↑ 1.2 1,601 3 / 3

Hash Join (cost=321,139.5..330,152.33 rows=1,975 width=20) (actual time=1,139.604..1,173.974 rows=1,601 loops=3)

7. 1.007 1,164.686 ↑ 1.2 1,601 3 / 3

Hash Join (cost=320,246.5..329,232.18 rows=1,975 width=20) (actual time=1,131.157..1,164.686 rows=1,601 loops=3)

8. 18.881 1,163.637 ↑ 1.2 8,008 3 / 3

Hash Join (cost=320,243.97..329,172.87 rows=9,875 width=24) (actual time=1,131.012..1,163.637 rows=8,008 loops=3)

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

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

10. 3.911 1,130.881 ↑ 1.2 8,008 3 / 3

Hash (cost=320,120.53..320,120.53 rows=9,875 width=24) (actual time=1,130.881..1,130.881 rows=8,008 loops=3)

11. 19.344 1,126.970 ↑ 1.2 8,008 3 / 3

Nested Loop (cost=10,290.61..320,120.53 rows=9,875 width=24) (actual time=19.445..1,126.97 rows=8,008 loops=3)

12. 664.780 1,054.859 ↑ 1.3 26,384 3 / 3

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

13. 370.870 370.870 ↑ 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.003..370.87 rows=3,999,332 loops=3)

14. 0.226 19.209 ↑ 1.3 877 3 / 3

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

15. 18.983 18.983 ↑ 1.3 877 3 / 3

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

  • Filter: ((p_type)::text = 'ECONOMY POLISHED STEEL'::text)
16. 52.767 52.767 ↓ 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.002..0.002 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))
17. 0.006 0.042 ↑ 1.0 5 3 / 3

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

18. 0.016 0.036 ↑ 1.0 5 3 / 3

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

19. 0.006 0.006 ↑ 1.0 25 3 / 3

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

20. 0.004 0.014 ↑ 1.0 1 3 / 3

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

21. 0.010 0.010 ↑ 1.0 1 3 / 3

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

  • Filter: (r_name = 'EUROPE'::bpchar)
22. 4.038 8.335 ↑ 1.0 20,000 3 / 3

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

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

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

24. 0.011 0.027 ↑ 1.0 25 3 / 3

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

25. 0.016 0.016 ↑ 1.0 25 3 / 3

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

Planning time : 0.907 ms
Execution time : 1,181.137 ms