explain.depesz.com

PostgreSQL's explain analyze made readable

Result: loQN

Settings
# exclusive inclusive rows x rows loops node
1. 0.099 5,695.813 ↓ 1.0 42 1

Sort (cost=458,927.69..458,927.80 rows=41 width=173) (actual time=5,695.805..5,695.813 rows=42 loops=1)

  • Sort Key: vsrc.request_count DESC
  • Sort Method: quicksort Memory: 36kB
2.          

CTE validator_status_request_count

3. 0.199 5,694.408 ↓ 1.1 45 1

Finalize GroupAggregate (cost=458,591.47..458,599.24 rows=42 width=104) (actual time=5,694.189..5,694.408 rows=45 loops=1)

  • Group Key: r.validator_id
4. 0.000 5,694.209 ↓ 1.3 266 1

Sort (cost=458,591.47..458,591.99 rows=210 width=104) (actual time=5,694.168..5,694.209 rows=266 loops=1)

  • Sort Key: r.validator_id
  • Sort Method: quicksort Memory: 62kB
5. 183.261 5,724.804 ↓ 1.3 266 1

Gather (cost=458,561.95..458,583.37 rows=210 width=104) (actual time=5,500.073..5,724.804 rows=266 loops=1)

  • Workers Planned: 5
  • Workers Launched: 5
6. 1,812.629 5,541.543 ↓ 1.0 44 6

Partial HashAggregate (cost=457,561.95..457,562.37 rows=42 width=104) (actual time=5,541.525..5,541.543 rows=44 loops=6)

  • Group Key: r.validator_id
7. 1,691.498 3,728.914 ↑ 1.2 1,369,908 6

Hash Join (cost=89,061.20..317,029.51 rows=1,606,085 width=177) (actual time=1,391.637..3,728.914 rows=1,369,908 loops=6)

  • Hash Cond: (mrs.req_id = r.id)
8. 647.858 647.858 ↑ 1.2 1,369,911 6

Parallel Seq Scan on map_req_status mrs (cost=0.00..120,955.64 rows=1,606,085 width=169) (actual time=0.069..647.858 rows=1,369,911 loops=6)

  • Filter: (delete_date = '0'::numeric)
  • Rows Removed by Filter: 3070
9. 406.586 1,389.558 ↓ 1.0 1,336,387 6

Hash (cost=65,903.60..65,903.60 rows=1,332,208 width=16) (actual time=1,389.558..1,389.558 rows=1,336,387 loops=6)

  • Buckets: 32768 Batches: 64 Memory Usage: 1239kB
10. 982.972 982.972 ↓ 1.0 1,336,387 6

Seq Scan on request r (cost=0.00..65,903.60 rows=1,332,208 width=16) (actual time=0.036..982.972 rows=1,336,387 loops=6)

  • Filter: (delete_date = '0'::numeric)
  • Rows Removed by Filter: 28
11. 0.173 5,695.714 ↓ 1.0 42 1

Nested Loop (cost=0.56..327.36 rows=41 width=173) (actual time=5,694.341..5,695.714 rows=42 loops=1)

12. 0.024 5,695.415 ↓ 1.0 42 1

Nested Loop (cost=0.29..314.18 rows=41 width=135) (actual time=5,694.258..5,695.415 rows=42 loops=1)

13. 5,694.446 5,694.446 ↓ 1.1 45 1

CTE Scan on validator_status_request_count vsrc (cost=0.00..0.84 rows=42 width=128) (actual time=5,694.196..5,694.446 rows=45 loops=1)

14. 0.945 0.945 ↑ 1.0 1 45

Index Scan using idx_emp_national_code on employee e (cost=0.29..7.45 rows=1 width=39) (actual time=0.020..0.021 rows=1 loops=45)

  • Index Cond: (national_code = vsrc.validator_id)
  • Filter: (delete_date = '0'::numeric)
  • Rows Removed by Filter: 0
15. 0.126 0.126 ↑ 1.0 1 42

Index Scan using idx_ide on combos c (cost=0.28..0.30 rows=1 width=18) (actual time=0.003..0.003 rows=1 loops=42)

  • Index Cond: (id = e.province_id)
  • Filter: (delete_date = '0'::numeric)
Planning time : 3.988 ms
Execution time : 5,727.327 ms