explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RNQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.036 971.121 ↓ 1.3 12 1

Sort (cost=37,643.87..37,643.89 rows=9 width=126) (actual time=971.120..971.121 rows=12 loops=1)

  • Sort Key: (CASE WHEN ((sum(CASE WHEN (s5.pxgoaltime > CURRENT_TIMESTAMP) THEN s5.pxurgencyassign WHEN (s5.pxdeadlinetime > CURRENT_TIMESTAMP) THEN (s5.pxurgencyassign * '0'::numeric) ELSE (s5.pxurgencyassign * '100'::numeric) END)) IS NULL) THEN 0 ELSE 1 END), (sum(CASE WHEN (s5.pxgoaltime > CURRENT_TIMESTAMP)
  • THEN s5.pxurgencyassign WHEN (s5.pxdeadlinetime > CURRENT_TIMESTAMP) THEN (s5.pxurgencyassign * '0'::numeric) ELSE (s5.pxurgencyassign * '100'::numeric) END)), (random())
  • Sort Method: quicksort Memory: 26kB
2. 0.027 971.085 ↓ 1.3 12 1

Merge Left Join (cost=37,625.88..37,643.73 rows=9 width=126) (actual time=970.873..971.085 rows=12 loops=1)

  • Merge Cond: ((ops.pyuseridentifier)::text = (s5.pxassignedoperatorid)::text)
3. 0.014 2.939 ↓ 1.3 12 1

Sort (cost=20.85..20.87 rows=9 width=82) (actual time=2.937..2.939 rows=12 loops=1)

  • Sort Key: ops.pyuseridentifier
  • Sort Method: quicksort Memory: 26kB
4. 0.020 2.925 ↓ 1.3 12 1

Hash Right Join (cost=19.58..20.70 rows=9 width=82) (actual time=2.922..2.925 rows=12 loops=1)

  • Hash Cond: ((s3.pxinsindexedkey)::text = (ops.pzinskey)::text)
5. 0.042 0.703 ↑ 1.0 33 1

GroupAggregate (cost=3.91..4.62 rows=33 width=50) (actual time=0.670..0.703 rows=33 loops=1)

  • Group Key: s3.pxinsindexedkey
6. 0.167 0.661 ↑ 1.0 50 1

Sort (cost=3.91..4.04 rows=50 width=49) (actual time=0.658..0.661 rows=50 loops=1)

  • Sort Key: s3.pxinsindexedkey
  • Sort Method: quicksort Memory: 30kB
7. 0.494 0.494 ↑ 1.0 50 1

Seq Scan on pr_index_operatorskills s3 (cost=0.00..2.50 rows=50 width=49) (actual time=0.479..0.494 rows=50 loops=1)

8. 0.011 2.202 ↓ 1.3 12 1

Hash (cost=15.56..15.56 rows=9 width=74) (actual time=2.201..2.202 rows=12 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 2.191 2.191 ↓ 1.3 12 1

Index Scan using pr_operators_id4 on pr_operators ops (cost=0.28..15.56 rows=9 width=74) (actual time=1.043..2.191 rows=12 loops=1)

  • Index Cond: ((pyworkgroup)::text = 'CALCAgentsExternal_AG1'::text)
  • Filter: ((pyopavailable)::text = 'true'::text)
10. 0.000 968.119 ↓ 1.1 70 1

Finalize GroupAggregate (cost=37,605.04..37,621.99 rows=65 width=88) (actual time=967.925..968.119 rows=70 loops=1)

  • Group Key: s5.pxassignedoperatorid
11. 3.921 969.315 ↓ 1.5 201 1

Gather Merge (cost=37,605.04..37,620.21 rows=130 width=56) (actual time=967.915..969.315 rows=201 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
12. 0.255 965.394 ↓ 1.0 67 3 / 3

Sort (cost=36,605.02..36,605.18 rows=65 width=56) (actual time=965.389..965.394 rows=67 loops=3)

  • Sort Key: s5.pxassignedoperatorid
  • Sort Method: quicksort Memory: 34kB
  • Worker 0: Sort Method: quicksort Memory: 34kB
  • Worker 1: Sort Method: quicksort Memory: 34kB
13. 42.153 965.139 ↓ 1.0 67 3 / 3

Partial HashAggregate (cost=36,602.25..36,603.06 rows=65 width=56) (actual time=965.099..965.139 rows=67 loops=3)

  • Group Key: s5.pxassignedoperatorid
14. 922.986 922.986 ↑ 1.2 81,208 3 / 3

Parallel Seq Scan on pc_assign_worklist s5 (cost=0.00..34,634.75 rows=98,375 width=45) (actual time=0.118..922.986 rows=81,208 loops=3)