explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MdBg

Settings
# exclusive inclusive rows x rows loops node
1. 0.715 8,589.204 ↑ 1.1 77 1

Bitmap Heap Scan on services s (cost=5.52..364.42 rows=82 width=699) (actual time=2,633.730..8,589.204 rows=77 loops=1)

  • Recheck Cond: (id < 200)
  • Filter: (SubPlan 1)
  • Rows Removed by Filter: 86
  • Heap Blocks: exact=47
2. 0.019 0.019 ↑ 1.0 163 1

Bitmap Index Scan on services_pkey (cost=0.00..5.50 rows=163 width=0) (actual time=0.019..0.019 rows=163 loops=1)

  • Index Cond: (id < 200)
3.          

SubPlan (forBitmap Heap Scan)

4. 34.235 8,588.470 ↓ 0.0 0 163

Nested Loop (cost=0.56..602,243.78 rows=494,342 width=0) (actual time=52.690..52.690 rows=0 loops=163)

5. 2,917.005 8,336.309 ↑ 128.4 446 163

Nested Loop (cost=0.00..133,387.45 rows=57,273 width=4) (actual time=18.038..51.143 rows=446 loops=163)

  • Join Filter: (a.store_id = fa.store_id)
  • Rows Removed by Join Filter: 76885
6. 2,923.079 2,923.079 ↑ 58.5 2 163

Seq Scan on store_assoc a (cost=0.00..4,233.14 rows=117 width=4) (actual time=17.932..17.933 rows=2 loops=163)

  • Filter: (assoc_id = 36992)
  • Rows Removed by Filter: 250023
7. 2,476.562 2,496.225 ↑ 1.4 50,622 249

Materialize (cost=0.00..1,416.33 rows=72,889 width=8) (actual time=0.000..10.025 rows=50,622 loops=249)

8. 19.663 19.663 ↑ 1.0 72,889 1

Seq Scan on fsa_store_assoc fa (cost=0.00..1,051.89 rows=72,889 width=8) (actual time=0.005..19.663 rows=72,889 loops=1)

9. 217.926 217.926 ↓ 0.0 0 72,642

Index Only Scan using user_service_map_pkey on user_service_map m (cost=0.56..8.09 rows=10 width=4) (actual time=0.003..0.003 rows=0 loops=72,642)

  • Index Cond: ((fsa_id = fa.fsa_id) AND (service_id = s.id))
  • Heap Fetches: 77
Planning time : 0.500 ms
Execution time : 8,590.028 ms