explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rf7l

Settings
# exclusive inclusive rows x rows loops node
1. 0.118 85.588 ↑ 1.0 1 1

Aggregate (cost=286.39..286.40 rows=1 width=32) (actual time=85.588..85.588 rows=1 loops=1)

2. 0.384 85.470 ↓ 6.0 6 1

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

3. 0.007 85.086 ↓ 6.0 6 1

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

4. 0.409 85.079 ↓ 6.0 6 1

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

5. 0.189 1.433 ↓ 82.2 329 1

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

6. 0.029 0.441 ↓ 11.0 11 1

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

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

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

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

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

9. 0.047 0.047 ↑ 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.047..0.047 rows=1 loops=1)

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

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

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

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

  • Index Cond: (route_id = j2.id)
12. 83.237 83.237 ↓ 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.251..0.253 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 : 56.897 ms
Execution time : 87.685 ms