explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FoYj

Settings
# exclusive inclusive rows x rows loops node
1. 8,130.860 303,001.190 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=5.28..435,170.20 rows=27 width=853) (actual time=446.518..303,001.190 rows=58,152 loops=1)

2. 93.130 225,087.930 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=4.85..434,410.53 rows=27 width=144) (actual time=431.603..225,087.930 rows=58,152 loops=1)

3. 45.103 212,375.816 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=4.42..434,365.94 rows=27 width=137) (actual time=431.600..212,375.816 rows=58,152 loops=1)

4. 80.014 211,225.825 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=4.00..434,321.68 rows=27 width=133) (actual time=430.756..211,225.825 rows=58,152 loops=1)

5. 76.498 204,400.179 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=3.56..434,257.17 rows=27 width=115) (actual time=429.561..204,400.179 rows=58,152 loops=1)

6. 143.797 174,956.921 ↓ 2,153.8 58,152 1

Nested Loop (cost=3.00..434,207.96 rows=27 width=117) (actual time=428.294..174,956.921 rows=58,152 loops=1)

7. 112.738 158,763.172 ↓ 2,076.9 58,152 1

Nested Loop (cost=2.56..434,160.92 rows=28 width=85) (actual time=428.234..158,763.172 rows=58,152 loops=1)

8. 122.170 120,328.266 ↓ 119.7 58,152 1

Nested Loop (cost=2.00..433,280.19 rows=486 width=91) (actual time=426.782..120,328.266 rows=58,152 loops=1)

9. 167.383 97,003.448 ↓ 6.8 58,152 1

Nested Loop (cost=1.57..418,902.92 rows=8,578 width=72) (actual time=424.850..97,003.448 rows=58,152 loops=1)

  • Join Filter: (decis.delo_id = delo_s.delo_id)
10. 66.367 62,526.385 ↓ 1.4 58,152 1

Nested Loop (cost=1.01..337,183.04 rows=41,845 width=50) (actual time=423.890..62,526.385 rows=58,152 loops=1)

11. 53,969.826 53,969.826 ↑ 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=423.352..53,969.826 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))
12. 8,490.192 8,490.192 ↑ 1.0 1 58,152

Index Scan using docs_prot_delo_id on docs_prot prot (cost=0.43..2.04 rows=1 width=24) (actual time=0.145..0.146 rows=1 loops=58,152)

  • Index Cond: (delo_id = decis.delo_id)
13. 34,309.680 34,309.680 ↑ 1.0 1 58,152

Index Scan using delo_pkey on delo delo_s (cost=0.56..1.94 rows=1 width=34) (actual time=0.588..0.590 rows=1 loops=58,152)

  • Index Cond: (delo_id = prot.delo_id)
14. 23,202.648 23,202.648 ↑ 1.0 1 58,152

Index Scan using viol_pk on viol (cost=0.43..1.67 rows=1 width=19) (actual time=0.397..0.399 rows=1 loops=58,152)

  • Index Cond: (delo_id = delo_s.delo_main_id)
15. 38,322.168 38,322.168 ↑ 1.0 1 58,152

Index Scan using delo_pkey on delo delo_f (cost=0.56..1.80 rows=1 width=14) (actual time=0.658..0.659 rows=1 loops=58,152)

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

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

  • Index Cond: (docs_id = viol.docs_post_id)
17. 29,366.760 29,366.760 ↑ 1.0 1 58,152

Index Scan using decis_docs_post_id on decis shtraf (cost=0.56..1.81 rows=1 width=10) (actual time=0.503..0.505 rows=1 loops=58,152)

  • Index Cond: (docs_post_id = p.docs_id)
  • Filter: (decis_kod = '65'::numeric)
18. 6,745.632 6,745.632 ↑ 1.0 1 58,152

Index Scan using uchast_pkey on uchast uch (cost=0.43..2.38 rows=1 width=24) (actual time=0.116..0.116 rows=1 loops=58,152)

  • Index Cond: (uchast_id = decis.uchast_id)
19. 1,104.888 1,104.888 ↓ 0.0 0 58,152

Index Scan using kart_ul_pkey on kart_ul ul (cost=0.42..1.63 rows=1 width=17) (actual time=0.018..0.019 rows=0 loops=58,152)

  • Index Cond: (id = uch.ul_id)
20. 12,618.984 12,618.984 ↑ 1.0 1 58,152

Index Scan using kart_fl_pkey on kart_fl fl (cost=0.43..1.64 rows=1 width=19) (actual time=0.217..0.217 rows=1 loops=58,152)

  • Index Cond: (id = uch.fl_id)
21. 7,094.544 7,094.544 ↑ 1.0 1 58,152

Index Scan using case_decis_id_un on "case" c (cost=0.42..1.79 rows=1 width=100) (actual time=0.121..0.122 rows=1 loops=58,152)

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

SubPlan (for Nested Loop Left Join)

23. 234.295 35,123.808 ↑ 1.0 1 58,152

Nested Loop (cost=0.87..5.71 rows=1 width=12) (actual time=0.602..0.604 rows=1 loops=58,152)

24. 20,876.568 20,876.568 ↑ 1.0 1 58,152

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..2.85 rows=1 width=6) (actual time=0.358..0.359 rows=1 loops=58,152)

  • Index Cond: (vehs_id = viol.vehs_id)
25. 14,012.945 14,012.945 ↑ 1.0 1 58,145

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..2.85 rows=1 width=18) (actual time=0.240..0.241 rows=1 loops=58,145)

  • Index Cond: (id = v_1.regno_id)
26. 581.520 581.520 ↑ 1.0 1 58,152

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

  • Index Cond: (stotv_id = p.stotv_id)
27. 232.608 232.608 ↑ 1.0 1 58,152

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

  • Filter: (delo_s.stad_delo_kod = stad_delo_kod)
  • Rows Removed by Filter: 6
28. 58.152 8,722.800 ↓ 0.0 0 58,152

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

29. 232.608 8,664.648 ↓ 0.0 0 58,152

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

  • Sort Key: dc.decis_dat DESC
  • Sort Method: quicksort Memory: 25kB
30. 8,432.040 8,432.040 ↓ 0.0 0 58,152

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

  • Index Cond: (delo_id = decis.delo_id)
  • Filter: (organ_sost_kod IS NULL)
  • Rows Removed by Filter: 1
31. 174.456 174.456 ↑ 1.0 1 58,152

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

  • Filter: (id = c.interaction_type)
  • Rows Removed by Filter: 1
32. 116.304 17,503.752 ↑ 1.0 1 58,152

Limit (cost=2.99..3.00 rows=1 width=8) (actual time=0.300..0.301 rows=1 loops=58,152)

33. 116.304 17,387.448 ↑ 1.0 1 58,152

Sort (cost=2.99..3.00 rows=1 width=8) (actual time=0.299..0.299 rows=1 loops=58,152)

  • Sort Key: di.dat_stad_ispoln DESC
  • Sort Method: quicksort Memory: 25kB
34. 17,271.144 17,271.144 ↑ 1.0 1 58,152

Index Scan using di_decis_stad on decis_ispoln di (cost=0.56..2.98 rows=1 width=8) (actual time=0.296..0.297 rows=1 loops=58,152)

  • Index Cond: ((decis_id = decis.decis_id) AND (stad_ispoln_kod = '15'::numeric))
35. 174.456 174.456 ↑ 1.0 1 58,152

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

  • Filter: (uchast_status = uch.uchast_status)
  • Rows Removed by Filter: 2
36. 174.456 174.456 ↑ 1.0 1 58,152

Seq Scan on s_case_status cs (cost=0.00..1.23 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=58,152)

  • Filter: (id = c.status)
  • Rows Removed by Filter: 17
Planning time : 4.449 ms
Execution time : 303,010.221 ms