explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2CNi

Settings
# exclusive inclusive rows x rows loops node
1. 0.040 1,954.227 ↓ 4.0 4 1

Nested Loop (cost=1,039.72..1,112.60 rows=1 width=228) (actual time=1,954.079..1,954.227 rows=4 loops=1)

2. 0.008 1,954.127 ↓ 4.0 4 1

Nested Loop Left Join (cost=1,039.15..1,103.09 rows=1 width=265) (actual time=1,954.029..1,954.127 rows=4 loops=1)

3. 5.275 1,954.031 ↓ 4.0 4 1

Nested Loop Anti Join (cost=1,038.58..1,093.59 rows=1 width=196) (actual time=1,953.985..1,954.031 rows=4 loops=1)

4. 23.479 1,846.808 ↓ 1,544.7 9,268 1

Bitmap Heap Scan on records r (cost=1,038.03..1,062.08 rows=6 width=196) (actual time=1,824.549..1,846.808 rows=9,268 loops=1)

  • Recheck Cond: ((time_from >= ('now'::cstring)::date) AND (call_id IS NOT NULL) AND (record_data ? 'campaign_id'::text))
  • Rows Removed by Index Recheck: 46
  • Heap Blocks: exact=6232
5. 3.062 1,823.329 ↓ 0.0 0 1

BitmapAnd (cost=1,038.03..1,038.03 rows=6 width=0) (actual time=1,823.329..1,823.329 rows=0 loops=1)

6. 2.595 2.595 ↓ 1.8 10,363 1

Bitmap Index Scan on records_time_from_idx (cost=0.00..283.10 rows=5,688 width=0) (actual time=2.595..2.595 rows=10,363 loops=1)

  • Index Cond: (time_from >= ('now'::cstring)::date)
7. 1,817.672 1,817.672 ↓ 1,004.6 8,855,223 1

Bitmap Index Scan on records_call_id_idx1 (cost=0.00..754.67 rows=8,815 width=0) (actual time=1,817.672..1,817.672 rows=8,855,223 loops=1)

  • Index Cond: (call_id IS NOT NULL)
8. 101.948 101.948 ↑ 1.0 1 9,268

Index Only Scan using interviews_pkey on interviews i (cost=0.56..5.24 rows=1 width=16) (actual time=0.011..0.011 rows=1 loops=9,268)

  • Index Cond: (call_id = r.call_id)
  • Heap Fetches: 9272
9. 0.088 0.088 ↑ 4.0 1 4

Index Scan using call_details_call_id_idx on call_details ai (cost=0.57..9.45 rows=4 width=85) (actual time=0.021..0.022 rows=1 loops=4)

  • Index Cond: (call_id = r.call_id)
  • Filter: (dtype = 'AnsweredInternalCall'::text)
  • Rows Removed by Filter: 9
10. 0.060 0.060 ↑ 5.0 1 4

Index Scan using call_details_call_id_idx on call_details s (cost=0.57..9.45 rows=5 width=24) (actual time=0.014..0.015 rows=1 loops=4)

  • Index Cond: (call_id = r.call_id)
  • Filter: (dtype = 'StartCall'::text)
  • Rows Removed by Filter: 9
Planning time : 1.328 ms
Execution time : 1,954.287 ms