explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xWfb

Settings
# exclusive inclusive rows x rows loops node
1. 11,268.144 83,799.667 ↑ 379.9 48 1

GroupAggregate (cost=98,575.63..100,809.66 rows=18,237 width=212) (actual time=65,325.111..83,799.667 rows=48 loops=1)

  • Group Key: (count(request.shomare_parvande)), cc.field, e.role_id, e.name, e.family, e.national_code
2. 42,112.063 72,531.523 ↓ 461.3 8,412,457 1

Sort (cost=98,575.63..98,621.22 rows=18,237 width=76) (actual time=62,730.778..72,531.523 rows=8,412,457 loops=1)

  • Sort Key: (count(request.shomare_parvande)) DESC, cc.field, e.role_id, e.name, e.family, e.national_code
  • Sort Method: external merge Disk: 771264kB
3. 874.395 30,419.460 ↓ 461.3 8,412,457 1

Nested Loop (cost=56,104.55..96,472.95 rows=18,237 width=76) (actual time=336.212..30,419.460 rows=8,412,457 loops=1)

4. 429.152 7,174.413 ↓ 410.8 1,242,814 1

Nested Loop (cost=56,104.12..93,187.77 rows=3,025 width=68) (actual time=336.121..7,174.413 rows=1,242,814 loops=1)

5. 180.003 3,016.819 ↓ 410.3 1,242,814 1

Nested Loop (cost=56,103.83..92,230.47 rows=3,029 width=76) (actual time=336.064..3,016.819 rows=1,242,814 loops=1)

6. 0.168 338.377 ↓ 1.2 51 1

Nested Loop (cost=56,103.40..56,431.45 rows=43 width=68) (actual time=335.947..338.377 rows=51 loops=1)

7. 0.204 337.648 ↓ 1.2 51 1

Nested Loop (cost=56,103.13..56,418.17 rows=43 width=60) (actual time=335.919..337.648 rows=51 loops=1)

8. 0.318 336.274 ↓ 1.1 45 1

Finalize GroupAggregate (cost=56,102.84..56,104.52 rows=42 width=16) (actual time=335.823..336.274 rows=45 loops=1)

  • Group Key: request.validator_id
9. 0.101 335.956 ↓ 1.3 218 1

Sort (cost=56,102.84..56,103.26 rows=168 width=16) (actual time=335.812..335.956 rows=218 loops=1)

  • Sort Key: request.validator_id
  • Sort Method: quicksort Memory: 41kB
10. 26.220 335.855 ↓ 1.3 218 1

Gather (cost=56,079.41..56,096.63 rows=168 width=16) (actual time=335.585..335.855 rows=218 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
11. 88.581 309.635 ↓ 1.0 44 5

Partial HashAggregate (cost=55,079.41..55,079.83 rows=42 width=16) (actual time=309.629..309.635 rows=44 loops=5)

  • Group Key: request.validator_id
12. 221.054 221.054 ↑ 1.2 267,267 5

Parallel Seq Scan on request (cost=0.00..53,414.15 rows=333,052 width=14) (actual time=0.047..221.054 rows=267,267 loops=5)

  • Filter: (delete_date = '0'::numeric)
  • Rows Removed by Filter: 6
13. 1.170 1.170 ↑ 1.0 1 45

Index Scan using idx_emp_national_code on employee e (cost=0.29..7.45 rows=1 width=44) (actual time=0.024..0.026 rows=1 loops=45)

  • Index Cond: (national_code = request.validator_id)
14. 0.561 0.561 ↑ 1.0 1 51

Index Scan using idx_ide on combos cc (cost=0.28..0.30 rows=1 width=18) (actual time=0.010..0.011 rows=1 loops=51)

  • Index Cond: (id = e.province_id)
15. 2,498.439 2,498.439 ↑ 1.1 24,369 51

Index Scan using idx_validator_copy1 on request r (cost=0.43..560.27 rows=27,227 width=24) (actual time=0.034..48.989 rows=24,369 loops=51)

  • Index Cond: (validator_id = e.national_code)
  • Filter: (delete_date = '0'::numeric)
  • Rows Removed by Filter: 0
16. 3,728.442 3,728.442 ↑ 1.0 1 1,242,814

Index Scan using union_pkey on ""union"" u (cost=0.29..0.31 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=1,242,814)

  • Index Cond: (id = r.union_id)
  • Filter: (delete_date = '0'::numeric)
17. 22,370.652 22,370.652 ↑ 1.0 7 1,242,814

Index Scan using idx_req_isnow on map_req_status mrs (cost=0.43..1.02 rows=7 width=16) (actual time=0.008..0.018 rows=7 loops=1,242,814)

  • Index Cond: (req_id = r.id)
  • Filter: (delete_date = '0'::numeric)
  • Rows Removed by Filter: 0
Planning time : 4.642 ms
Execution time : 84,000.936 ms