explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rbgy

Settings
# exclusive inclusive rows x rows loops node
1. 0.312 887.092 ↑ 1.0 100 1

Limit (cost=112,285.49..112,285.74 rows=100 width=112) (actual time=886.594..887.092 rows=100 loops=1)

2.          

CTE zags_az

3. 4.793 227.114 ↓ 1.0 17,249 1

Gather (cost=1,000.42..42,667.36 rows=17,129 width=176) (actual time=1.266..227.114 rows=17,249 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 142.754 222.321 ↑ 1.2 8,624 2

Nested Loop (cost=0.42..39,954.46 rows=10,076 width=176) (actual time=0.200..222.321 rows=8,624 loops=2)

5. 79.558 79.558 ↑ 1.2 8,624 2

Parallel Seq Scan on zags_az za (cost=0.00..2,894.76 rows=10,076 width=28) (actual time=0.080..79.558 rows=8,624 loops=2)

6. 0.009 0.009 ↑ 1.0 1 17,249

Index Scan using government_list_body_pkey on government_list_body (cost=0.42..3.68 rows=1 width=164) (actual time=0.009..0.009 rows=1 loops=17,249)

  • Index Cond: (government_list_body_id = za.az_first_gov_list_body_id)
7.          

CTE doc_management_request_az

8. 73.332 182.344 ↓ 1.0 14,473 1

HashAggregate (cost=1,189.88..1,333.34 rows=14,346 width=48) (actual time=150.016..182.344 rows=14,473 loops=1)

  • Group Key: doc_man_req_az.doc_management_request_az_id, doc_man_req_az.zags_az_id, zags_list_azkind.name_short
9. 59.553 109.012 ↓ 1.0 14,473 1

Hash Join (cost=1.58..1,082.28 rows=14,346 width=48) (actual time=0.700..109.012 rows=14,473 loops=1)

  • Hash Cond: (doc_man_req_az.zags_list_azkind_id = zags_list_azkind.zags_list_azkind_id)
10. 49.314 49.314 ↓ 1.0 14,473 1

Index Scan using doc_management_request_request_id on doc_management_request_az doc_man_req_az (cost=0.42..918.19 rows=14,346 width=24) (actual time=0.478..49.314 rows=14,473 loops=1)

  • Index Cond: (doc_management_request_id = 550)
  • Filter: az_is_found
11. 0.069 0.145 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=40) (actual time=0.145..0.145 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
12. 0.076 0.076 ↑ 1.0 7 1

Seq Scan on zags_list_azkind (cost=0.00..1.07 rows=7 width=40) (actual time=0.053..0.076 rows=7 loops=1)

13. 34.557 886.780 ↑ 12,286.6 100 1

Sort (cost=68,284.79..71,356.45 rows=1,228,663 width=112) (actual time=886.587..886.780 rows=100 loops=1)

  • Sort Key: zags_az.az_date DESC
  • Sort Method: top-N heapsort Memory: 49kB
14. 93.214 852.223 ↑ 84.9 14,473 1

Merge Join (cost=2,824.50..21,326.17 rows=1,228,663 width=112) (actual time=694.333..852.223 rows=14,473 loops=1)

  • Merge Cond: (doc_management_request_az.zags_az_id = zags_az.zags_az_id)
15. 68.527 321.503 ↓ 1.0 14,473 1

Sort (cost=1,277.39..1,313.26 rows=14,346 width=48) (actual time=292.277..321.503 rows=14,473 loops=1)

  • Sort Key: doc_management_request_az.zags_az_id
  • Sort Method: quicksort Memory: 1685kB
16. 252.976 252.976 ↓ 1.0 14,473 1

CTE Scan on doc_management_request_az (cost=0.00..286.92 rows=14,346 width=48) (actual time=150.028..252.976 rows=14,473 loops=1)

17. 100.608 437.506 ↑ 1.0 16,838 1

Sort (cost=1,547.10..1,589.93 rows=17,129 width=80) (actual time=402.021..437.506 rows=16,838 loops=1)

  • Sort Key: zags_az.zags_az_id
  • Sort Method: quicksort Memory: 5026kB
18. 336.898 336.898 ↓ 1.0 17,249 1

CTE Scan on zags_az (cost=0.00..342.58 rows=17,129 width=80) (actual time=1.281..336.898 rows=17,249 loops=1)