explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BAJk

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 90,844.977 ↑ 1.0 50 1

Limit (cost=3,114,211.98..3,114,212.10 rows=50 width=44) (actual time=90,844.968..90,844.977 rows=50 loops=1)

2. 2.674 90,844.968 ↑ 93.4 100 1

Sort (cost=3,114,211.85..3,114,235.21 rows=9,343 width=44) (actual time=90,844.961..90,844.968 rows=100 loops=1)

  • Sort Key: (max(timeblock0_.start_date))
  • Sort Method: top-N heapsort Memory: 33kB
3. 9,266.653 90,842.294 ↓ 2.0 18,727 1

HashAggregate (cost=3,113,714.63..3,113,854.77 rows=9,343 width=44) (actual time=90,834.855..90,842.294 rows=18,727 loops=1)

  • Group Key: location1_.corporation_id
4. 11,955.404 81,575.641 ↓ 10.1 36,488,523 1

Hash Right Join (cost=324,828.78..3,086,505.80 rows=3,627,843 width=12) (actual time=6,810.874..81,575.641 rows=36,488,523 loops=1)

  • Hash Cond: (timeblock0_.location_id = location1_.id)
5. 63,795.858 69,582.991 ↓ 1.8 37,164,435 1

Bitmap Heap Scan on timeblock timeblock0_ (cost=319,343.54..2,821,918.06 rows=20,523,081 width=12) (actual time=6,773.445..69,582.991 rows=37,164,435 loops=1)

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Filter: (date_published IS NOT NULL)
  • Rows Removed by Filter: 3398609
  • Heap Blocks: exact=1951763
6. 5,787.133 5,787.133 ↑ 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,787.133..5,787.133 rows=40,563,178 loops=1)

7. 4.521 37.246 ↑ 1.0 22,850 1

Hash (cost=5,196.38..5,196.38 rows=23,109 width=16) (actual time=37.246..37.246 rows=22,850 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1328kB
8. 21.151 32.725 ↑ 1.0 22,850 1

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

  • Recheck Cond: (deleted = 'N'::bpchar)
  • Heap Blocks: exact=2659
9. 11.574 11.574 ↑ 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=11.574..11.574 rows=22,850 loops=1)