explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kkUW

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 110.675 ↑ 2.0 5 1

Nested Loop Left Join (cost=9.06..4,920.72 rows=10 width=20) (actual time=18.797..110.675 rows=5 loops=1)

  • Join Filter: (a_s.state_id = s.state_id)
  • Rows Removed by Join Filter: 20
  • Filter: ((s.pause_queues IS NULL) OR (NOT s.pause_queues) OR (s.description = 'Wraptime'::text))
2. 0.056 110.634 ↑ 2.4 5 1

Nested Loop Left Join (cost=9.06..4,918.50 rows=12 width=24) (actual time=18.782..110.634 rows=5 loops=1)

  • Join Filter: (a.name = a_s.userid)
  • Rows Removed by Join Filter: 210
3. 0.053 18.218 ↓ 5.0 5 1

Hash Join (cost=9.06..79.82 rows=1 width=31) (actual time=18.099..18.218 rows=5 loops=1)

  • Hash Cond: (ltrim(peermon_log.name, 'iptel'::text) = a.num)
4. 0.109 0.109 ↓ 3.3 63 1

Index Scan using peermon_log_asterisk_id_name_idx on peermon_log (cost=0.14..70.79 rows=19 width=9) (actual time=0.015..0.109 rows=63 loops=1)

  • Filter: ((name ~~ 'iptel%'::text) AND (channeltype = 'SIP'::text) AND (status = 'OK'::text))
  • Rows Removed by Filter: 4
5. 0.011 18.056 ↑ 1.4 5 1

Hash (cost=8.83..8.83 rows=7 width=31) (actual time=18.056..18.056 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
6. 0.030 18.045 ↑ 1.4 5 1

Seq Scan on agents a (cost=0.00..8.83 rows=7 width=31) (actual time=9.249..18.045 rows=5 loops=1)

  • Filter: (available AND (NOT (SubPlan 1)))
  • Rows Removed by Filter: 23
7.          

SubPlan (for Seq Scan)

8. 18.015 18.015 ↓ 0.0 0 5

Function Scan on get_active_exten_calls (cost=0.25..0.26 rows=1 width=0) (actual time=3.603..3.603 rows=0 loops=5)

  • Filter: (call_id IS NOT NULL)
  • Rows Removed by Filter: 1
9. 92.360 92.360 ↑ 14.6 43 5

Seq Scan on agent_states a_s (cost=0.00..4,830.82 rows=629 width=15) (actual time=0.115..18.472 rows=43 loops=5)

  • Filter: (now() <@ range)
  • Rows Removed by Filter: 62833
10. 0.004 0.010 ↑ 1.0 5 5

Materialize (cost=0.00..1.07 rows=5 width=17) (actual time=0.002..0.002 rows=5 loops=5)

11. 0.006 0.006 ↑ 1.0 5 1

Seq Scan on states s (cost=0.00..1.05 rows=5 width=17) (actual time=0.004..0.006 rows=5 loops=1)

Planning time : 1.655 ms
Execution time : 110.749 ms