explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kx3v

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

GroupAggregate (cost=219,225.14..219,868.52 rows=2,406 width=40) (actual time=350.115..350.121 rows=2 loops=1)

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

Gather Merge (cost=219,225.14..219,765.01 rows=3,950 width=72) (actual time=349.47..351.603 rows=6 loops=1)

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

GroupAggregate (cost=218,225.12..218,309.06 rows=1,975 width=72) (actual time=346.113..346.692 rows=2 loops=3)

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

Sort (cost=218,225.12..218,230.06 rows=1,975 width=46) (actual time=345.535..345.641 rows=1,601 loops=3)

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

Hash Join (cost=209,067.14..218,117.01 rows=1,975 width=46) (actual time=309.533..345.008 rows=1,601 loops=3)

6. 0.957 344.310 ↑ 1.2 1,601 3 / 3

Hash Join (cost=209,065.58..218,078.42 rows=1,975 width=20) (actual time=309.473..344.31 rows=1,601 loops=3)

7. 1.003 334.800 ↑ 1.2 1,601 3 / 3

Hash Join (cost=208,172.58..217,158.26 rows=1,975 width=20) (actual time=300.813..334.8 rows=1,601 loops=3)

8. 19.293 333.754 ↑ 1.2 8,008 3 / 3

Hash Join (cost=208,170.05..217,098.95 rows=9,875 width=24) (actual time=300.668..333.754 rows=8,008 loops=3)

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

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

10. 3.207 300.544 ↑ 1.2 8,008 3 / 3

Hash (cost=208,046.61..208,046.61 rows=9,875 width=24) (actual time=300.544..300.544 rows=8,008 loops=3)

11. 64.945 297.337 ↑ 1.2 8,008 3 / 3

Hash Join (cost=135,676.03..208,046.61 rows=9,875 width=24) (actual time=65.008..297.337 rows=8,008 loops=3)

12. 167.655 167.655 ↑ 1.2 303,803 3 / 3

Seq Scan on orders orders (cost=0..70,936 rows=371,582 width=12) (actual time=0.008..167.655 rows=303,803 loops=3)

  • Filter: ((o_orderdate >= '1995-01-01'::date) AND (o_orderdate <= '1996-12-31'::date))
13. 8.789 64.737 ↑ 1.3 26,384 3 / 3

Hash (cost=135,260.78..135,260.78 rows=33,220 width=20) (actual time=64.737..64.737 rows=26,384 loops=3)

14. 5.433 55.948 ↑ 1.3 26,384 3 / 3

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

15. 20.686 20.686 ↑ 1.3 877 3 / 3

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

  • Filter: ((p_type)::text = 'ECONOMY POLISHED STEEL'::text)
16. 29.829 29.829 ↑ 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.008..0.034 rows=30 loops=2,632)

  • Index Cond: (l_partkey = part.p_partkey)
17. 0.005 0.043 ↑ 1.0 5 3 / 3

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

18. 0.016 0.038 ↑ 1.0 5 3 / 3

Hash Join (cost=1.07..2.47 rows=5 width=4) (actual time=0.033..0.038 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.016 ↑ 1.0 1 3 / 3

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

21. 0.012 0.012 ↑ 1.0 1 3 / 3

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

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

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

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

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

24. 0.009 0.025 ↑ 1.0 25 3 / 3

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.025..0.025 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 : 1.013 ms
Execution time : 351.931 ms