explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6qus

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.501 ↑ 1.0 5 1

Limit (cost=2.11..152.12 rows=5 width=163) (actual time=0.259..0.501 rows=5 loops=1)

  • Buffers: shared hit=112 read=5
2. 0.003 0.496 ↑ 1,278.6 5 1

Nested Loop (cost=2.11..191,805.17 rows=6,393 width=163) (actual time=0.258..0.496 rows=5 loops=1)

  • Buffers: shared hit=112 read=5
3. 0.003 0.333 ↑ 1,278.6 5 1

Nested Loop (cost=1.27..160,954.63 rows=6,393 width=163) (actual time=0.195..0.333 rows=5 loops=1)

  • Buffers: shared hit=70 read=4
4. 0.230 0.230 ↑ 1,278.6 5 1

Index Scan using index_directions_on_popularity on directions directions (cost=0.43..160,857.83 rows=6,393 width=163) (actual time=0.092..0.23 rows=5 loops=1)

  • Filter: ((directions.from_id <> 3863) AND (directions.domain_id = 1) AND (directions.to_id = 4037))
  • Buffers: shared hit=59 read=4
5. 0.007 0.100 ↑ 1.0 1 5

Materialize (cost=0.84..16.89 rows=1 width=8) (actual time=0.02..0.02 rows=1 loops=5)

  • Buffers: shared hit=11
6. 0.001 0.093 ↑ 1.0 1 1

Nested Loop (cost=0.84..16.89 rows=1 width=8) (actual time=0.093..0.093 rows=1 loops=1)

  • Buffers: shared hit=11
7. 0.047 0.047 ↑ 1.0 1 1

Index Scan using cities_pkey on cities cities_1 (cost=0.42..8.44 rows=1 width=8) (actual time=0.047..0.047 rows=1 loops=1)

  • Index Cond: (cities_1.id = 4037)
  • Filter: (NOT cities_1.hide)
  • Buffers: shared hit=7
8. 0.045 0.045 ↑ 1.0 1 1

Index Only Scan using index_cities_service_configs_on_service_config_id_and_city_id on cities_service_configs cities_service_configs_1 (cost=0.42..8.44 rows=1 width=4) (actual time=0.045..0.045 rows=1 loops=1)

  • Index Cond: ((cities_service_configs_1.service_config_id = 15) AND (cities_service_configs_1.city_id = 4037))
  • Buffers: shared hit=4
9. 0.010 0.160 ↑ 1.0 1 5

Nested Loop (cost=0.84..4.82 rows=1 width=12) (actual time=0.032..0.032 rows=1 loops=5)

  • Buffers: shared hit=42 read=1
10. 0.080 0.080 ↑ 1.0 1 5

Index Scan using cities_pkey on cities cities (cost=0.42..4.2 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=5)

  • Index Cond: (cities.id = directions.from_id)
  • Filter: (NOT cities.hide)
  • Buffers: shared hit=19 read=1
11. 0.070 0.070 ↑ 1.0 1 5

Index Only Scan using index_cities_service_configs_on_service_config_id_and_city_id on cities_service_configs cities_service_configs (cost=0.42..0.6 rows=1 width=4) (actual time=0.014..0.014 rows=1 loops=5)

  • Index Cond: ((cities_service_configs.service_config_id = 15) AND (cities_service_configs.city_id = cities.id))
  • Buffers: shared hit=23