explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qjAV

Settings
# exclusive inclusive rows x rows loops node
1. 0.129 96.487 ↑ 1.0 1 1

Aggregate (cost=286.38..286.40 rows=1 width=32) (actual time=96.487..96.487 rows=1 loops=1)

2. 8.619 96.358 ↓ 6.0 6 1

Subquery Scan on t (cost=5.34..286.38 rows=1 width=115) (actual time=30.544..96.358 rows=6 loops=1)

3. 0.008 87.739 ↓ 6.0 6 1

Limit (cost=5.34..286.37 rows=1 width=91) (actual time=21.937..87.739 rows=6 loops=1)

4. 0.235 87.731 ↓ 6.0 6 1

Nested Loop (cost=5.34..286.37 rows=1 width=91) (actual time=21.934..87.731 rows=6 loops=1)

5. 0.198 0.969 ↓ 82.2 329 1

Nested Loop (cost=4.91..162.93 rows=4 width=16) (actual time=0.173..0.969 rows=329 loops=1)

6. 0.027 0.199 ↓ 11.0 11 1

Nested Loop (cost=0.28..23.10 rows=1 width=16) (actual time=0.132..0.199 rows=11 loops=1)

  • Join Filter: (j2.security_group_id = ANY (j3.security_groups))
7. 0.139 0.139 ↓ 5.5 11 1

Seq Scan on routes j2 (cost=0.00..14.75 rows=2 width=32) (actual time=0.102..0.139 rows=11 loops=1)

  • Filter: (organization_id = '253e4a2e-cf11-4ce3-8974-6de0e9858d9f'::uuid)
  • Rows Removed by Filter: 452
8. 0.017 0.033 ↑ 1.0 1 11

Materialize (cost=0.28..8.30 rows=1 width=246) (actual time=0.003..0.003 rows=1 loops=11)

9. 0.016 0.016 ↑ 1.0 1 1

Index Scan using users_idx_id on users j3 (cost=0.28..8.29 rows=1 width=246) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (id = 'd54504af-9d45-4522-8f8c-5f80ac2e5314'::uuid)
10. 0.440 0.572 ↑ 1.5 30 11

Bitmap Heap Scan on stops j1 (cost=4.64..139.38 rows=45 width=32) (actual time=0.018..0.052 rows=30 loops=11)

  • Recheck Cond: (route_id = j2.id)
  • Heap Blocks: exact=143
11. 0.132 0.132 ↓ 1.1 51 11

Bitmap Index Scan on route_id_stops (cost=0.00..4.62 rows=45 width=0) (actual time=0.012..0.012 rows=51 loops=11)

  • Index Cond: (route_id = j2.id)
12. 86.527 86.527 ↓ 0.0 0 329

Index Scan using stop_id_forms on forms t1 (cost=0.42..30.85 rows=1 width=91) (actual time=0.261..0.263 rows=0 loops=329)

  • Index Cond: (stop_id = j1.id)
  • Filter: ((NOT deleted) AND (effective_date >= '2020-05-01 05:00:00+00'::timestamp with time zone) AND (effective_date <= '2020-06-01 04:59:59.999+00'::timestamp with time zone) AND (updated_at >= '2020-05-01 04:00:00+00'::timestamp with time zone) AND (organization_id = '253e4a2e-cf11-4ce3-8974-6de0e9858d9f'::uuid) AND (form_type_code = '4'::numeric) AND (product = 1))
  • Rows Removed by Filter: 182
Planning time : 105.443 ms
Execution time : 112.469 ms