explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9Jco

Settings
# exclusive inclusive rows x rows loops node
1. 0.881 112,789.139 ↑ 1.0 50 1

Limit (cost=413,845.31..413,845.93 rows=50 width=36) (actual time=112,769.222..112,789.139 rows=50 loops=1)

2. 9.603 112,788.258 ↑ 42,025.2 50 1

Unique (cost=413,845.31..440,111.03 rows=2,101,258 width=36) (actual time=112,769.192..112,788.258 rows=50 loops=1)

3. 29,107.412 112,778.655 ↑ 1,814.6 1,158 1

Sort (cost=413,845.31..419,098.45 rows=2,101,258 width=36) (actual time=112,769.171..112,778.655 rows=1,158 loops=1)

  • Sort Key: carriers.name, carriers.id, apdb_networks.id, apdb_networks.name
  • Sort Method: external merge Disk: 89,024kB
4. 33,267.583 83,671.243 ↑ 1.0 2,100,008 1

Hash Join (cost=34,839.55..78,264.57 rows=2,101,258 width=36) (actual time=228.317..83,671.243 rows=2,100,008 loops=1)

  • Hash Cond: (apdb_networks.carrier_id = carriers.id)
5. 33,480.834 50,394.686 ↑ 1.0 2,101,258 1

Hash Join (cost=34,787.95..72,678.23 rows=2,101,258 width=24) (actual time=219.303..50,394.686 rows=2,101,258 loops=1)

  • Hash Cond: (venues_networks_map.apdb_network_id = apdb_networks.id)
6. 16,696.368 16,769.642 ↑ 1.0 2,101,258 1

Bitmap Heap Scan on venues_networks_map (cost=34,092.03..66,463.61 rows=2,101,258 width=4) (actual time=75.061..16,769.642 rows=2,101,258 loops=1)

  • Heap Blocks: exact=11,359
7. 73.274 73.274 ↑ 1.0 2,101,258 1

Bitmap Index Scan on venues_networks_map_venue_id_apdb_network_id_idx (cost=0.00..33,566.72 rows=2,101,258 width=0) (actual time=73.258..73.274 rows=2,101,258 loops=1)

8. 69.459 144.210 ↑ 1.0 8,075 1

Hash (cost=594.98..594.98 rows=8,075 width=24) (actual time=144.194..144.210 rows=8,075 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 522kB
9. 74.751 74.751 ↑ 1.0 8,075 1

Index Scan using apdb_networks_id_idx on apdb_networks (cost=0.28..594.98 rows=8,075 width=24) (actual time=0.019..74.751 rows=8,075 loops=1)

10. 4.338 8.974 ↑ 1.0 448 1

Hash (cost=46.00..46.00 rows=448 width=16) (actual time=8.960..8.974 rows=448 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 30kB
11. 4.636 4.636 ↑ 1.0 448 1

Index Scan using carriers_id_idx on carriers (cost=0.27..46.00 rows=448 width=16) (actual time=0.025..4.636 rows=448 loops=1)