explain.depesz.com

PostgreSQL's explain analyze made readable

Result: T7Wv

Settings
# exclusive inclusive rows x rows loops node
1. 11,998.985 570,721.543 ↓ 2,327.2 58,180 1

Nested Loop Left Join (cost=5.84..450,257.35 rows=25 width=853) (actual time=473.971..570,721.543 rows=58,180 loops=1)

2. 172.440 445,911.538 ↓ 2,327.2 58,180 1

Nested Loop Left Join (cost=5.42..449,625.06 rows=25 width=152) (actual time=457.009..445,911.538 rows=58,180 loops=1)

3. 121.810 420,779.878 ↓ 2,327.2 58,180 1

Nested Loop Left Join (cost=4.98..449,578.45 rows=25 width=145) (actual time=457.004..420,779.878 rows=58,180 loops=1)

4. 133.725 418,156.328 ↓ 2,327.2 58,180 1

Nested Loop Left Join (cost=4.56..449,532.11 rows=25 width=141) (actual time=453.293..418,156.328 rows=58,180 loops=1)

5. 158.101 404,001.223 ↓ 2,327.2 58,180 1

Nested Loop Left Join (cost=4.12..449,471.89 rows=25 width=123) (actual time=451.327..404,001.223 rows=58,180 loops=1)

6. 117.592 378,314.833 ↓ 2,326.0 58,151 1

Nested Loop Left Join (cost=3.56..449,401.36 rows=25 width=115) (actual time=440.678..378,314.833 rows=58,151 loops=1)

7. 216.332 316,324.577 ↓ 2,326.0 58,151 1

Nested Loop (cost=3.00..449,350.78 rows=25 width=117) (actual time=439.305..316,324.577 rows=58,151 loops=1)

8. 143.532 292,382.229 ↓ 2,076.9 58,152 1

Nested Loop (cost=2.56..449,298.03 rows=28 width=85) (actual time=436.820..292,382.229 rows=58,152 loops=1)

9. 172.821 213,384.585 ↓ 119.7 58,152 1

Nested Loop (cost=2.00..448,319.32 rows=486 width=91) (actual time=434.899..213,384.585 rows=58,152 loops=1)

10. 286.377 171,574.932 ↓ 6.8 58,152 1

Nested Loop (cost=1.57..432,180.60 rows=8,578 width=72) (actual time=433.066..171,574.932 rows=58,152 loops=1)

  • Join Filter: (decis.delo_id = delo_s.delo_id)
11. 155.517 102,436.587 ↓ 1.4 58,152 1

Nested Loop (cost=1.01..344,080.64 rows=41,845 width=50) (actual time=428.597..102,436.587 rows=58,152 loops=1)

12. 83,614.278 83,614.278 ↑ 1.3 58,152 1

Index Scan using decis_det_ogai_kod on decis (cost=0.58..185,182.24 rows=73,971 width=26) (actual time=427.670..83,614.278 rows=58,152 loops=1)

  • Index Cond: ((decis_dat >= date_trunc('year'::text, (('now'::cstring)::date)::timestamp with time zone)) AND (decis_dat <= (('now'::cstring)::date - '1 day'::interval)) AND ((ogai_sost_kod)::text = '45597'::text) AND (decis_kod = '95'::numeric))
13. 18,666.792 18,666.792 ↑ 1.0 1 58,152

Index Scan using docs_prot_delo_id on docs_prot prot (cost=0.43..2.14 rows=1 width=24) (actual time=0.319..0.321 rows=1 loops=58,152)

  • Index Cond: (delo_id = decis.delo_id)
14. 68,851.968 68,851.968 ↑ 1.0 1 58,152

Index Scan using delo_pkey on delo delo_s (cost=0.56..2.09 rows=1 width=34) (actual time=1.183..1.184 rows=1 loops=58,152)

  • Index Cond: (delo_id = prot.delo_id)
15. 41,636.832 41,636.832 ↑ 1.0 1 58,152

Index Scan using viol_pk on viol (cost=0.43..1.87 rows=1 width=19) (actual time=0.713..0.716 rows=1 loops=58,152)

  • Index Cond: (delo_id = delo_s.delo_main_id)
16. 78,854.112 78,854.112 ↑ 1.0 1 58,152

Index Scan using delo_pkey on delo delo_f (cost=0.56..2.00 rows=1 width=14) (actual time=1.351..1.356 rows=1 loops=58,152)

  • Index Cond: (delo_id = delo_s.delo_main_id)
17. 23,726.016 23,726.016 ↑ 1.0 1 58,152

Index Scan using docs_post_pkey on docs_post p (cost=0.43..1.87 rows=1 width=38) (actual time=0.407..0.408 rows=1 loops=58,152)

  • Index Cond: (docs_id = viol.docs_post_id)
  • Filter: (doc_n IS NOT NULL)
  • Rows Removed by Filter: 0
18. 61,872.664 61,872.664 ↑ 1.0 1 58,151

Index Scan using decis_docs_post_id on decis shtraf (cost=0.56..2.01 rows=1 width=10) (actual time=1.059..1.064 rows=1 loops=58,151)

  • Index Cond: (docs_post_id = p.docs_id)
  • Filter: (decis_kod = '65'::numeric)
19. 25,528.289 25,528.289 ↑ 1.0 1 58,151

Index Scan using di_decis_stad on decis_ispoln di (cost=0.56..2.81 rows=1 width=14) (actual time=0.437..0.439 rows=1 loops=58,151)

  • Index Cond: ((decis_id = decis.decis_id) AND (stad_ispoln_kod = '15'::numeric))
20. 14,021.380 14,021.380 ↑ 1.0 1 58,180

Index Scan using uchast_pkey on uchast uch (cost=0.43..2.40 rows=1 width=24) (actual time=0.240..0.241 rows=1 loops=58,180)

  • Index Cond: (uchast_id = decis.uchast_id)
21. 2,501.740 2,501.740 ↓ 0.0 0 58,180

Index Scan using kart_ul_pkey on kart_ul ul (cost=0.42..1.84 rows=1 width=17) (actual time=0.043..0.043 rows=0 loops=58,180)

  • Index Cond: (id = uch.ul_id)
22. 24,959.220 24,959.220 ↑ 1.0 1 58,180

Index Scan using kart_fl_pkey on kart_fl fl (cost=0.43..1.85 rows=1 width=19) (actual time=0.429..0.429 rows=1 loops=58,180)

  • Index Cond: (id = uch.fl_id)
23. 16,290.400 16,290.400 ↑ 1.0 1 58,180

Index Scan using case_decis_id_un on "case" c (cost=0.42..1.95 rows=1 width=100) (actual time=0.279..0.280 rows=1 loops=58,180)

  • Index Cond: (decis_id = decis.decis_id)
24.          

SubPlan (for Nested Loop Left Join)

25. 295.457 79,532.060 ↑ 1.0 1 58,180

Nested Loop (cost=0.87..5.71 rows=1 width=12) (actual time=1.364..1.367 rows=1 loops=58,180)

26. 41,365.980 41,365.980 ↑ 1.0 1 58,180

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..2.85 rows=1 width=6) (actual time=0.709..0.711 rows=1 loops=58,180)

  • Index Cond: (vehs_id = viol.vehs_id)
27. 37,870.623 37,870.623 ↑ 1.0 1 58,173

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..2.85 rows=1 width=18) (actual time=0.650..0.651 rows=1 loops=58,173)

  • Index Cond: (id = v_1.regno_id)
28. 698.160 698.160 ↑ 1.0 1 58,180

Index Scan using s_stotv_pkey on s_stotv stotv (cost=0.27..2.69 rows=1 width=15) (actual time=0.012..0.012 rows=1 loops=58,180)

  • Index Cond: (stotv_id = p.stotv_id)
29. 290.900 290.900 ↑ 1.0 1 58,180

Seq Scan on s_sstad_delo sd (cost=0.00..1.09 rows=1 width=118) (actual time=0.004..0.005 rows=1 loops=58,180)

  • Filter: (delo_s.stad_delo_kod = stad_delo_kod)
  • Rows Removed by Filter: 6
30. 58.180 15,243.160 ↓ 0.0 0 58,180

Limit (cost=10.29..10.30 rows=1 width=102) (actual time=0.262..0.262 rows=0 loops=58,180)

31. 349.080 15,184.980 ↓ 0.0 0 58,180

Sort (cost=10.29..10.30 rows=1 width=102) (actual time=0.261..0.261 rows=0 loops=58,180)

  • Sort Key: dc.decis_dat DESC
  • Sort Method: quicksort Memory: 25kB
32. 14,835.900 14,835.900 ↓ 0.0 0 58,180

Index Scan using decis_delo_id on decis dc (cost=0.56..10.28 rows=1 width=102) (actual time=0.254..0.255 rows=0 loops=58,180)

  • Index Cond: (delo_id = decis.delo_id)
  • Filter: (organ_sost_kod IS NULL)
  • Rows Removed by Filter: 1
33. 232.720 232.720 ↑ 1.0 1 58,180

Seq Scan on s_interaction_type it (cost=0.00..1.02 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=58,180)

  • Filter: (id = c.interaction_type)
  • Rows Removed by Filter: 1
34. 232.720 232.720 ↑ 1.0 1 58,180

Seq Scan on s_suchast_status status (cost=0.00..1.04 rows=1 width=118) (actual time=0.004..0.004 rows=1 loops=58,180)

  • Filter: (uchast_status = uch.uchast_status)
  • Rows Removed by Filter: 2
35. 290.900 290.900 ↑ 1.0 1 58,180

Seq Scan on s_case_status cs (cost=0.00..1.23 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=58,180)

  • Filter: (id = c.status)
  • Rows Removed by Filter: 17
Planning time : 5.713 ms
Execution time : 570,733.654 ms