explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q1vo

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 59,790.234 ↑ 1.0 50 1

Limit (cost=2,938,886.95..2,938,887.07 rows=50 width=44) (actual time=59,790.226..59,790.234 rows=50 loops=1)

2. 2.743 59,790.225 ↑ 93.4 100 1

Sort (cost=2,938,886.82..2,938,910.18 rows=9,343 width=44) (actual time=59,790.219..59,790.225 rows=100 loops=1)

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

HashAggregate (cost=2,938,389.59..2,938,529.74 rows=9,343 width=44) (actual time=59,779.982..59,787.482 rows=18,643 loops=1)

  • Group Key: location1_.corporation_id
4. 10,446.103 51,513.983 ↓ 20.6 36,473,996 1

Hash Right Join (cost=327,877.90..2,925,114.41 rows=1,770,024 width=12) (actual time=7,284.085..51,513.983 rows=36,473,996 loops=1)

  • Hash Cond: (timeblock0_.location_id = location1_.id)
5. 34,775.632 40,803.844 ↓ 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=7,019.933..40,803.844 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. 6,028.212 6,028.212 ↑ 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=6,028.212..6,028.212 rows=40,563,178 loops=1)

7. 7.366 264.036 ↓ 2.0 22,760 1

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

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

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

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

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

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

11. 8.043 135.486 ↓ 1.0 24,164 1

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

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

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

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

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

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