explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bWXd

Settings
# exclusive inclusive rows x rows loops node
1. 0.908 372,017.523 ↑ 1.0 50 1

Limit (cost=1,082,719.98..1,082,721.11 rows=50 width=90) (actual time=372,015.489..372,017.523 rows=50 loops=1)

2. 0.736 372,016.615 ↑ 58,843.4 50 1

Unique (cost=1,082,719.98..1,148,918.76 rows=2,942,168 width=90) (actual time=372,015.473..372,016.615 rows=50 loops=1)

3. 75,788.327 372,015.879 ↑ 58,843.4 50 1

Sort (cost=1,082,719.98..1,090,075.40 rows=2,942,168 width=90) (actual time=372,015.456..372,015.879 rows=50 loops=1)

  • Sort Key: carriers.name, carriers.id, apdb_networks.id, apdb_networks.name, venues.id, venues.name, locations.id, locations.name
  • Sort Method: external merge Disk: 299,640kB
4. 45,998.149 296,227.552 ↓ 1.0 2,943,834 1

Hash Join (cost=216,254.63..464,913.86 rows=2,942,168 width=90) (actual time=121,069.197..296,227.552 rows=2,943,834 loops=1)

  • Hash Cond: (apdb_networks.carrier_id = carriers.id)
5. 46,161.333 250,217.813 ↓ 1.0 2,945,081 1

Hash Join (cost=216,224.55..457,134.06 rows=2,942,168 width=78) (actual time=121,057.585..250,217.813 rows=2,945,081 loops=1)

  • Hash Cond: (venues_networks_map.apdb_network_id = apdb_networks.id)
6. 58,480.295 203,914.753 ↓ 1.0 2,945,081 1

Hash Join (cost=215,948.86..449,131.14 rows=2,942,168 width=58) (actual time=120,915.829..203,914.753 rows=2,945,081 loops=1)

  • Hash Cond: (locations.venue_id = venues.id)
7. 24,550.388 24,550.388 ↓ 1.0 2,945,081 1

Seq Scan on locations (cost=0.00..126,671.73 rows=2,941,573 width=33) (actual time=0.741..24,550.388 rows=2,945,081 loops=1)

8. 24,227.736 120,884.070 ↑ 1.0 2,101,258 1

Hash (cost=173,266.14..173,266.14 rows=2,101,258 width=33) (actual time=120,884.056..120,884.070 rows=2,101,258 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 2,605kB
9. 39,394.080 96,656.334 ↑ 1.0 2,101,258 1

Hash Join (cost=104,598.74..173,266.14 rows=2,101,258 width=33) (actual time=40,631.366..96,656.334 rows=2,101,258 loops=1)

  • Hash Cond: (venues_networks_map.venue_id = venues.id)
10. 16,661.615 16,661.615 ↑ 1.0 2,101,258 1

Seq Scan on venues_networks_map (cost=0.00..32,371.58 rows=2,101,258 width=8) (actual time=0.533..16,661.615 rows=2,101,258 loops=1)

11. 23,495.503 40,600.639 ↓ 1.0 2,101,258 1

Hash (cost=63,976.33..63,976.33 rows=2,100,833 width=25) (actual time=40,600.625..40,600.639 rows=2,101,258 loops=1)

  • Buckets: 65,536 Batches: 64 Memory Usage: 2,342kB
12. 17,105.136 17,105.136 ↓ 1.0 2,101,258 1

Seq Scan on venues (cost=0.00..63,976.33 rows=2,100,833 width=25) (actual time=0.514..17,105.136 rows=2,101,258 loops=1)

13. 71.287 141.727 ↑ 1.0 8,075 1

Hash (cost=174.75..174.75 rows=8,075 width=24) (actual time=141.713..141.727 rows=8,075 loops=1)

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

Seq Scan on apdb_networks (cost=0.00..174.75 rows=8,075 width=24) (actual time=0.604..70.440 rows=8,075 loops=1)

15. 5.710 11.590 ↑ 1.0 448 1

Hash (cost=24.48..24.48 rows=448 width=16) (actual time=11.576..11.590 rows=448 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 30kB
16. 5.880 5.880 ↑ 1.0 448 1

Seq Scan on carriers (cost=0.00..24.48 rows=448 width=16) (actual time=0.368..5.880 rows=448 loops=1)