explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4WJ3 : Optimization for: Optimization for: plan #T8Up; plan #Lsjq

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.007 358.420 ↑ 1.0 1 1

Aggregate (cost=18,408,668.03..18,408,668.04 rows=1 width=8) (actual time=358.419..358.420 rows=1 loops=1)

2. 358.398 358.413 ↓ 0.0 0 1

Seq Scan on c4_call_entry (cost=0.00..18,406,826.83 rows=736,481 width=16) (actual time=358.413..358.413 rows=0 loops=1)

  • Filter: (((account_id = 'ca5870fb-9978-403a-94a9-2993d0c7e582'::uuid) AND (from_user_id = 'ca5870fb-9978-403a-94a9-2993d0c7e582'::uuid)) OR (alternatives: SubPlan 1 or hashed SubPlan 2))
  • Rows Removed by Filter: 1,473,390
3.          

SubPlan (for Seq Scan)

4. 0.000 0.000 ↓ 0.0 0

Result (cost=0.42..12.46 rows=1 width=0) (never executed)

  • One-Time Filter: (c4_call_entry.account_id = 'ca5870fb-9978-403a-94a9-2993d0c7e582'::uuid)
5. 0.000 0.000 ↓ 0.0 0

Index Scan using call_entry_targets_call_entry_id_index on c4_call_entry_targets (cost=0.42..12.46 rows=1 width=0) (never executed)

  • Index Cond: (call_entry_id = c4_call_entry.id)
  • Filter: (user_id = 'ca5870fb-9978-403a-94a9-2993d0c7e582'::uuid)
6. 0.001 0.015 ↓ 0.0 0 1

Bitmap Heap Scan on c4_call_entry_targets c4_call_entry_targets_1 (cost=15.96..1,572.38 rows=456 width=32) (actual time=0.015..0.015 rows=0 loops=1)

  • Recheck Cond: (user_id = 'ca5870fb-9978-403a-94a9-2993d0c7e582'::uuid)
7. 0.014 0.014 ↓ 0.0 0 1

Bitmap Index Scan on call_entry_targets_user_id_index (cost=0.00..15.85 rows=456 width=0) (actual time=0.014..0.014 rows=0 loops=1)

  • Index Cond: (user_id = 'ca5870fb-9978-403a-94a9-2993d0c7e582'::uuid)
Planning time : 0.409 ms
Execution time : 358.509 ms