explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 50P

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 56,350.723 ↑ 1.0 50 1

Limit (cost=2,950,601.11..2,950,601.24 rows=50 width=44) (actual time=56,350.714..56,350.723 rows=50 loops=1)

2. 2.737 56,350.714 ↑ 93.4 100 1

Sort (cost=2,950,600.99..2,950,624.34 rows=9,343 width=44) (actual time=56,350.708..56,350.714 rows=100 loops=1)

  • Sort Key: (max(timeblock0_.start_date))
  • Sort Method: top-N heapsort Memory: 33kB
3. 8,191.923 56,347.977 ↓ 2.0 18,643 1

HashAggregate (cost=2,950,103.76..2,950,243.90 rows=9,343 width=44) (actual time=56,340.409..56,347.977 rows=18,643 loops=1)

  • Group Key: location1_.corporation_id
4. 12,709.502 48,156.054 ↓ 19.0 37,155,243 1

Hash Right Join (cost=328,409.47..2,935,453.24 rows=1,953,403 width=12) (actual time=6,615.437..48,156.054 rows=37,155,243 loops=1)

  • Hash Cond: (timeblock0_.location_id = location1_.id)
5. 29,783.759 35,356.334 ↓ 1.7 37,855,103 1

Bitmap Heap Scan on timeblock timeblock0_ (cost=319,875.10..2,822,449.62 rows=22,649,332 width=12) (actual time=6,525.122..35,356.334 rows=37,855,103 loops=1)

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Filter: (publisher_id IS NOT NULL)
  • Rows Removed by Filter: 2707941
  • Heap Blocks: exact=1951763
6. 5,572.575 5,572.575 ↑ 1.0 40,563,178 1

Bitmap Index Scan on i_timeblock_start (cost=0.00..314,212.77 rows=40,597,962 width=0) (actual time=5,572.575..5,572.575 rows=40,563,178 loops=1)

7. 5.773 90.218 ↓ 2.0 22,760 1

Hash (cost=8,393.43..8,393.43 rows=11,275 width=16) (actual time=90.218..90.218 rows=22,760 loops=1)

  • Buckets: 32768 (originally 16384) Batches: 1 (originally 1) Memory Usage: 1323kB
8. 11.005 84.445 ↓ 2.0 22,760 1

Hash Join (cost=3,091.82..8,393.43 rows=11,275 width=16) (actual time=37.430..84.445 rows=22,760 loops=1)

  • Hash Cond: (location1_.corporation_id = corporation.id)
9. 36.532 38.755 ↑ 1.0 22,850 1

Bitmap Heap Scan on location location1_ (cost=186.51..5,196.38 rows=23,109 width=16) (actual time=2.583..38.755 rows=22,850 loops=1)

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Heap Blocks: exact=2659
10. 2.223 2.223 ↑ 1.0 22,850 1

Bitmap Index Scan on idx_location_id_del (cost=0.00..180.74 rows=23,109 width=0) (actual time=2.223..2.223 rows=22,850 loops=1)

11. 5.452 34.685 ↓ 1.0 24,164 1

Hash (cost=2,604.15..2,604.15 rows=24,092 width=8) (actual time=34.685..34.685 rows=24,164 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1200kB
12. 26.254 29.233 ↓ 1.0 24,164 1

Bitmap Heap Scan on corporation (cost=254.00..2,604.15 rows=24,092 width=8) (actual time=3.190..29.233 rows=24,164 loops=1)

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Heap Blocks: exact=1710
13. 2.979 2.979 ↓ 1.0 24,199 1

Bitmap Index Scan on corporation_del (cost=0.00..247.98 rows=24,092 width=0) (actual time=2.979..2.979 rows=24,199 loops=1)

  • Index Cond: (deleted = 'N'::bpchar)