explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5F73

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.159 ↑ 1.0 1 1

Nested Loop Anti Join (cost=2.41..52.00 rows=1 width=8) (actual time=0.130..0.159 rows=1 loops=1)

2. 0.006 0.145 ↑ 1.0 1 1

Nested Loop Anti Join (cost=1.98..43.77 rows=1 width=67) (actual time=0.116..0.145 rows=1 loops=1)

3. 0.006 0.128 ↑ 1.0 1 1

Nested Loop (cost=1.55..35.55 rows=1 width=134) (actual time=0.100..0.128 rows=1 loops=1)

  • Join Filter: ((a2.args -> 'line_num'::text) = ae1.exten)
  • Rows Removed by Join Filter: 1
4. 0.003 0.108 ↓ 2.0 2 1

Nested Loop (cost=1.55..34.40 rows=1 width=134) (actual time=0.085..0.108 rows=2 loops=1)

5. 0.002 0.077 ↓ 2.0 2 1

Nested Loop (cost=1.11..26.21 rows=1 width=152) (actual time=0.066..0.077 rows=2 loops=1)

6. 0.002 0.045 ↓ 3.0 3 1

Nested Loop (cost=0.56..18.23 rows=1 width=89) (actual time=0.029..0.045 rows=3 loops=1)

7. 0.009 0.009 ↑ 1.0 2 1

Seq Scan on unprocessed_calls uc (cost=0.00..1.06 rows=2 width=18) (actual time=0.008..0.009 rows=2 loops=1)

  • Filter: (NOT finished)
  • Rows Removed by Filter: 4
8. 0.034 0.034 ↓ 2.0 2 2

Index Scan using call_details_call_id_dtype_expr_idx on call_details a1 (cost=0.56..8.58 rows=1 width=71) (actual time=0.016..0.017 rows=2 loops=2)

  • Index Cond: ((call_id = uc.call_id) AND (dtype = 'AnsweredInternalCall'::text))
9. 0.030 0.030 ↑ 1.0 1 3

Index Scan using call_details_call_id_dtype_expr_idx on call_details a2 (cost=0.56..7.97 rows=1 width=71) (actual time=0.009..0.010 rows=1 loops=3)

  • Index Cond: ((call_id = a1.call_id) AND (dtype = 'AnsweredInternalCall'::text))
  • Filter: (a1.cel_id <> cel_id)
  • Rows Removed by Filter: 1
10. 0.028 0.028 ↑ 1.0 1 2

Index Scan using call_details_call_id_idx on call_details s (cost=0.43..8.17 rows=1 width=17) (actual time=0.013..0.014 rows=1 loops=2)

  • Index Cond: (call_id = a1.call_id)
  • Filter: ((dtype = 'StartCall'::text) AND ((args -> 'caller_type'::text) = 'originate'::text))
  • Rows Removed by Filter: 6
11. 0.014 0.014 ↑ 1.0 1 2

Seq Scan on agent_extens ae1 (cost=0.00..1.14 rows=1 width=11) (actual time=0.006..0.007 rows=1 loops=2)

  • Filter: ((userid = 'bara'::text) AND (now() <@ range))
  • Rows Removed by Filter: 7
12. 0.011 0.011 ↓ 0.0 0 1

Index Scan using call_details_call_id_idx on call_details h (cost=0.43..8.21 rows=1 width=67) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (call_id = a1.call_id)
  • Filter: ((dtype = 'Hangup'::text) AND ((args -> 'channel_name'::text) = (a1.args -> 'channel_name'::text)))
  • Rows Removed by Filter: 7
13. 0.009 0.009 ↓ 0.0 0 1

Index Scan using call_details_call_id_idx on call_details h_1 (cost=0.43..8.21 rows=1 width=67) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: (call_id = a2.call_id)
  • Filter: ((dtype = 'Hangup'::text) AND ((args -> 'channel_name'::text) = (a2.args -> 'channel_name'::text)))
  • Rows Removed by Filter: 7