explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dAjr

Settings
# exclusive inclusive rows x rows loops node
1. 9,709.186 381,759.370 ↓ 57,881.0 57,881 1

Nested Loop Left Join (cost=5.28..434,400.01 rows=1 width=853) (actual time=257.853..381,759.370 rows=57,881 loops=1)

2. 100.946 278,803.893 ↓ 57,881.0 57,881 1

Nested Loop Left Join (cost=4.84..434,372.02 rows=1 width=231) (actual time=250.839..278,803.893 rows=57,881 loops=1)

3. 130.479 277,603.208 ↓ 57,881.0 57,881 1

Nested Loop (cost=4.42..434,370.38 rows=1 width=227) (actual time=250.023..277,603.208 rows=57,881 loops=1)

4. 116.369 266,191.241 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=4.00..434,321.68 rows=27 width=133) (actual time=248.721..266,191.241 rows=58,152 loops=1)

5. 142.221 256,886.856 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=3.56..434,257.17 rows=27 width=115) (actual time=247.946..256,886.856 rows=58,152 loops=1)

6. 173.191 217,899.099 ↓ 2,153.8 58,152 1

Nested Loop (cost=3.00..434,207.96 rows=27 width=117) (actual time=242.156..217,899.099 rows=58,152 loops=1)

7. 139.010 196,151.516 ↓ 2,076.9 58,152 1

Nested Loop (cost=2.56..434,160.92 rows=28 width=85) (actual time=241.377..196,151.516 rows=58,152 loops=1)

8. 118.921 146,699.610 ↓ 119.7 58,152 1

Nested Loop (cost=2.00..433,280.19 rows=486 width=91) (actual time=239.941..146,699.610 rows=58,152 loops=1)

9. 225.964 119,888.921 ↓ 6.8 58,152 1

Nested Loop (cost=1.57..418,902.92 rows=8,578 width=72) (actual time=238.542..119,888.921 rows=58,152 loops=1)

  • Join Filter: (decis.delo_id = delo_s.delo_id)
10. 93.851 75,002.221 ↓ 1.4 58,152 1

Nested Loop (cost=1.01..337,183.04 rows=41,845 width=50) (actual time=237.598..75,002.221 rows=58,152 loops=1)

11. 60,602.978 60,602.978 ↑ 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=236.466..60,602.978 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)::tex (...)
12. 14,305.392 14,305.392 ↑ 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.245..0.246 rows=1 loops=58,152)

  • Index Cond: (delo_id = decis.delo_id)
13. 44,660.736 44,660.736 ↑ 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.767..0.768 rows=1 loops=58,152)

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

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

  • Index Cond: (delo_id = delo_s.delo_main_id)
15. 49,312.896 49,312.896 ↑ 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.846..0.848 rows=1 loops=58,152)

  • Index Cond: (delo_id = delo_s.delo_main_id)
16. 21,574.392 21,574.392 ↑ 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.370..0.371 rows=1 loops=58,152)

  • Index Cond: (docs_id = viol.docs_post_id)
17. 38,845.536 38,845.536 ↑ 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.666..0.668 rows=1 loops=58,152)

  • Index Cond: (docs_post_id = p.docs_id)
  • Filter: (decis_kod = '65'::numeric)
18. 9,188.016 9,188.016 ↑ 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.158..0.158 rows=1 loops=58,152)

  • Index Cond: (uchast_id = decis.uchast_id)
19. 11,281.488 11,281.488 ↑ 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.194..0.194 rows=1 loops=58,152)

  • Index Cond: ((decis_id = decis.decis_id) AND (decis_id IS NOT NULL))
20. 1,099.739 1,099.739 ↓ 0.0 0 57,881

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

  • Index Cond: (id = uch.ul_id)
21. 15,280.584 15,280.584 ↑ 1.0 1 57,881

Index Scan using kart_fl_pkey on kart_fl fl (cost=0.43..1.64 rows=1 width=19) (actual time=0.264..0.264 rows=1 loops=57,881)

  • Index Cond: (id = uch.fl_id)
22.          

SubPlan (for Nested Loop Left Join)

23. 176.009 45,899.633 ↑ 1.0 1 57,881

Nested Loop (cost=0.87..5.71 rows=1 width=12) (actual time=0.791..0.793 rows=1 loops=57,881)

24. 26,162.212 26,162.212 ↑ 1.0 1 57,881

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..2.85 rows=1 width=6) (actual time=0.451..0.452 rows=1 loops=57,881)

  • Index Cond: (vehs_id = viol.vehs_id)
25. 19,561.412 19,561.412 ↑ 1.0 1 57,874

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..2.85 rows=1 width=18) (actual time=0.337..0.338 rows=1 loops=57,874)

  • Index Cond: (id = v_1.regno_id)
26. 636.691 636.691 ↑ 1.0 1 57,881

Index Scan using s_stotv_pkey on s_stotv stotv (cost=0.27..2.69 rows=1 width=15) (actual time=0.011..0.011 rows=1 loops=57,881)

  • Index Cond: (stotv_id = p.stotv_id)
27. 231.524 231.524 ↑ 1.0 1 57,881

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

  • Filter: (delo_s.stad_delo_kod = stad_delo_kod)
  • Rows Removed by Filter: 6
28. 115.762 12,791.701 ↓ 0.0 0 57,881

Limit (cost=10.29..10.30 rows=1 width=102) (actual time=0.220..0.221 rows=0 loops=57,881)

29. 231.524 12,675.939 ↓ 0.0 0 57,881

Sort (cost=10.29..10.30 rows=1 width=102) (actual time=0.219..0.219 rows=0 loops=57,881)

  • Sort Key: dc.decis_dat DESC
  • Sort Method: quicksort Memory: 25kB
30. 12,444.415 12,444.415 ↓ 0.0 0 57,881

Index Scan using decis_delo_id on decis dc (cost=0.56..10.28 rows=1 width=102) (actual time=0.214..0.215 rows=0 loops=57,881)

  • Index Cond: (delo_id = decis.delo_id)
  • Filter: (organ_sost_kod IS NULL)
  • Rows Removed by Filter: 1
31. 231.524 231.524 ↑ 1.0 1 57,881

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

  • Filter: (id = c.interaction_type)
  • Rows Removed by Filter: 1
32. 57.881 17,711.586 ↑ 1.0 1 57,881

Limit (cost=2.99..3.00 rows=1 width=8) (actual time=0.306..0.306 rows=1 loops=57,881)

33. 173.643 17,653.705 ↑ 1.0 1 57,881

Sort (cost=2.99..3.00 rows=1 width=8) (actual time=0.305..0.305 rows=1 loops=57,881)

  • Sort Key: di.dat_stad_ispoln DESC
  • Sort Method: quicksort Memory: 25kB
34. 17,480.062 17,480.062 ↑ 1.0 1 57,881

Index Scan using di_decis_stad on decis_ispoln di (cost=0.56..2.98 rows=1 width=8) (actual time=0.301..0.302 rows=1 loops=57,881)

  • Index Cond: ((decis_id = decis.decis_id) AND (stad_ispoln_kod = '15'::numeric))
35. 231.524 231.524 ↑ 1.0 1 57,881

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=57,881)

  • Filter: (uchast_status = uch.uchast_status)
  • Rows Removed by Filter: 2
36. 231.524 231.524 ↑ 1.0 1 57,881

Seq Scan on s_case_status cs (cost=0.00..1.23 rows=1 width=32) (actual time=0.003..0.004 rows=1 loops=57,881)

  • Filter: (id = c.status)
  • Rows Removed by Filter: 17
Planning time : 4.123 ms
Execution time : 381,769.460 ms