explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EDXb

Settings
# exclusive inclusive rows x rows loops node
1. 2.005 41,072.868 ↑ 38.9 544 1

Sort (cost=601,924.90..601,977.74 rows=21,137 width=208) (actual time=41,072.823..41,072.868 rows=544 loops=1)

  • Sort Key: pt.title, p2.title
  • Sort Method: quicksort Memory: 146kB
2. 1.617 41,070.863 ↑ 38.9 544 1

GroupAggregate (cost=599,560.99..600,406.47 rows=21,137 width=208) (actual time=41,068.998..41,070.863 rows=544 loops=1)

  • Group Key: r.point_id, pt.id, rp.package_id, p2.id
3. 8.391 41,069.246 ↑ 9.0 2,345 1

Sort (cost=599,560.99..599,613.83 rows=21,137 width=125) (actual time=41,068.969..41,069.246 rows=2,345 loops=1)

  • Sort Key: r.point_id, pt.id, rp.package_id, p2.id
  • Sort Method: quicksort Memory: 634kB
4. 11.218 41,060.855 ↑ 9.0 2,345 1

Hash Left Join (cost=4,038.34..598,042.56 rows=21,137 width=125) (actual time=36,689.604..41,060.855 rows=2,345 loops=1)

  • Hash Cond: (rp.package_id = p2.id)
5. 1,666.624 41,025.032 ↑ 9.0 2,345 1

Hash Join (cost=3,935.14..597,648.72 rows=21,137 width=70) (actual time=36,657.473..41,025.032 rows=2,345 loops=1)

  • Hash Cond: (rp.request_id = r.id)
6. 1,746.366 39,349.940 ↓ 1.0 11,852,481 1

Append (cost=0.00..550,462.91 rows=11,477,148 width=29) (actual time=2.021..39,349.940 rows=11,852,481 loops=1)

7. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on req_package2 rp (cost=0.00..0.00 rows=1 width=112) (actual time=0.004..0.004 rows=0 loops=1)

  • Filter: (state = 3)
8. 37,603.570 37,603.570 ↓ 1.0 11,852,481 1

Seq Scan on req_package2_1 rp_1 (cost=0.00..550,462.91 rows=11,477,147 width=29) (actual time=2.016..37,603.570 rows=11,852,481 loops=1)

  • Filter: (state = 3)
  • Rows Removed by Filter: 1530344
9. 0.272 8.468 ↑ 1.8 926 1

Hash (cost=3,914.22..3,914.22 rows=1,673 width=57) (actual time=8.468..8.468 rows=926 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 100kB
10. 1.019 8.196 ↑ 1.8 926 1

Merge Right Join (cost=0.56..3,914.22 rows=1,673 width=57) (actual time=0.660..8.196 rows=926 loops=1)

  • Merge Cond: (pt.id = r.point_id)
11. 0.020 0.020 ↓ 1.3 35 1

Index Scan using point_pkey on point pt (cost=0.14..12.54 rows=27 width=41) (actual time=0.007..0.020 rows=35 loops=1)

12. 7.157 7.157 ↑ 1.8 926 1

Index Scan using autoidx_55eb4f2637c06f22b364aebe793b06e6 on request r (cost=0.42..3,888.59 rows=1,673 width=16) (actual time=0.647..7.157 rows=926 loops=1)

  • Index Cond: ((close_time)::date = '2019-01-06'::date)
13. 22.542 24.605 ↓ 1.0 2,088 1

Hash (cost=78.09..78.09 rows=2,009 width=55) (actual time=24.605..24.605 rows=2,088 loops=1)

  • Buckets: 4096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 217kB
14. 2.063 2.063 ↓ 1.0 2,088 1

Seq Scan on package2 p2 (cost=0.00..78.09 rows=2,009 width=55) (actual time=0.597..2.063 rows=2,088 loops=1)