explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7e0p

Settings
# exclusive inclusive rows x rows loops node
1. 7,838.238 860,466.817 ↓ 20,556.0 20,556 1

Nested Loop Left Join (cost=6.84..465,438.87 rows=1 width=2,736) (actual time=540.879..860,466.817 rows=20,556 loops=1)

  • Join Filter: (st.stotv_id = court_decis.stotv_id)
  • Rows Removed by Join Filter: 9,194,285
2. 80.893 792,859.099 ↓ 20,556.0 20,556 1

Nested Loop Left Join (cost=6.84..465,355.88 rows=1 width=2,209) (actual time=525.433..792,859.099 rows=20,556 loops=1)

3. 59.170 774,894.486 ↓ 20,556.0 20,556 1

Nested Loop Left Join (cost=6.41..465,353.81 rows=1 width=2,202) (actual time=525.431..774,894.486 rows=20,556 loops=1)

4. 65.861 773,643.068 ↓ 20,556.0 20,556 1

Nested Loop Left Join (cost=5.98..465,351.75 rows=1 width=2,198) (actual time=525.389..773,643.068 rows=20,556 loops=1)

5. 80.404 765,765.927 ↓ 20,556.0 20,556 1

Nested Loop Left Join (cost=5.55..465,349.30 rows=1 width=2,180) (actual time=525.331..765,765.927 rows=20,556 loops=1)

  • Join Filter: (p.doc_n IS NOT NULL)
6. 215.434 752,570.795 ↓ 20,556.0 20,556 1

Nested Loop Left Join (cost=5.11..465,346.98 rows=1 width=2,125) (actual time=525.327..752,570.795 rows=20,556 loops=1)

  • Filter: ((court_decis.delo_id IS NOT NULL) OR (vozv.delo_id IS NOT NULL))
  • Rows Removed by Filter: 37,338
7. 204.941 642,661.391 ↓ 57,886.0 57,886 1

Nested Loop (cost=4.55..465,325.42 rows=1 width=363) (actual time=507.760..642,661.391 rows=57,886 loops=1)

8. 162.797 604,421.772 ↓ 2,154.0 58,157 1

Nested Loop Left Join (cost=4.12..465,269.71 rows=27 width=257) (actual time=503.962..604,421.772 rows=58,157 loops=1)

9. 197.601 577,101.991 ↓ 2,153.8 58,152 1

Nested Loop Left Join (cost=3.56..465,032.79 rows=27 width=129) (actual time=498.524..577,101.991 rows=58,152 loops=1)

10. 248.048 478,801.966 ↓ 2,153.8 58,152 1

Nested Loop (cost=3.00..464,972.84 rows=27 width=131) (actual time=495.156..478,801.966 rows=58,152 loops=1)

11. 190.189 439,999.142 ↓ 2,076.9 58,152 1

Nested Loop (cost=2.56..464,914.45 rows=28 width=99) (actual time=492.165..439,999.142 rows=58,152 loops=1)

12. 208.391 330,308.737 ↓ 119.7 58,152 1

Nested Loop (cost=2.00..463,838.82 rows=486 width=105) (actual time=490.281..330,308.737 rows=58,152 loops=1)

13. 300.947 266,947.274 ↓ 6.8 58,152 1

Nested Loop (cost=1.57..445,964.79 rows=8,578 width=86) (actual time=488.283..266,947.274 rows=58,152 loops=1)

  • Join Filter: (decis.delo_id = delo_s.delo_id)
14. 204.016 170,172.159 ↓ 1.4 58,152 1

Nested Loop (cost=1.01..351,022.64 rows=41,845 width=44) (actual time=478.355..170,172.159 rows=58,152 loops=1)

15. 131,006.303 131,006.303 ↑ 1.3 58,152 1

Index Scan using decis_det_ogai_kod on decis (cost=0.58..185,182.24 rows=73,971 width=12) (actual time=466.313..131,006.303 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))
16. 38,961.840 38,961.840 ↑ 1.0 1 58,152

Index Scan using docs_prot_delo_id on docs_prot prot (cost=0.43..2.23 rows=1 width=32) (actual time=0.668..0.670 rows=1 loops=58,152)

  • Index Cond: (delo_id = decis.delo_id)
17. 96,474.168 96,474.168 ↑ 1.0 1 58,152

Index Scan using delo_pkey on delo delo_s (cost=0.56..2.26 rows=1 width=42) (actual time=1.650..1.659 rows=1 loops=58,152)

  • Index Cond: (delo_id = prot.delo_id)
18. 63,153.072 63,153.072 ↑ 1.0 1 58,152

Index Scan using viol_pk on viol (cost=0.43..2.07 rows=1 width=19) (actual time=1.082..1.086 rows=1 loops=58,152)

  • Index Cond: (delo_id = delo_s.delo_main_id)
19. 109,500.216 109,500.216 ↑ 1.0 1 58,152

Index Scan using delo_pkey on delo delo_f (cost=0.56..2.20 rows=1 width=14) (actual time=1.877..1.883 rows=1 loops=58,152)

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

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

  • Index Cond: (docs_id = viol.docs_post_id)
21. 98,102.424 98,102.424 ↑ 1.0 1 58,152

Index Scan using decis_docs_post_id on decis decis_f (cost=0.56..2.21 rows=1 width=10) (actual time=1.679..1.687 rows=1 loops=58,152)

  • Index Cond: (docs_post_id = p.docs_id)
  • Filter: (decis_kod = '65'::numeric)
22. 27,156.984 27,156.984 ↓ 0.0 0 58,152

Index Scan using decis_delo_id on decis court_decis (cost=0.56..8.77 rows=1 width=128) (actual time=0.463..0.467 rows=0 loops=58,152)

  • Index Cond: (decis.delo_id = delo_id)
  • Filter: (organ_sost_kod IS NULL)
  • Rows Removed by Filter: 1
23. 38,034.678 38,034.678 ↑ 1.0 1 58,157

Index Scan using case_delo_id_un on "case" c (cost=0.42..2.05 rows=1 width=124) (actual time=0.647..0.654 rows=1 loops=58,157)

  • Index Cond: (delo_id = delo_s.delo_id)
24. 109,693.970 109,693.970 ↓ 0.0 0 57,886

Index Scan using decis_ispoln_delo_id on decis_ispoln vozv (cost=0.56..21.55 rows=1 width=1,768) (actual time=1.679..1.895 rows=0 loops=57,886)

  • Index Cond: (decis.delo_id = delo_id)
  • Filter: (stad_ispoln_kod = '46'::numeric)
  • Rows Removed by Filter: 3
25. 13,114.728 13,114.728 ↑ 1.0 1 20,556

Index Scan using docs_post_pkey on docs_post pt (cost=0.43..2.31 rows=1 width=67) (actual time=0.581..0.638 rows=1 loops=20,556)

  • Index Cond: (docs_id = court_decis.docs_post_id)
26. 7,811.280 7,811.280 ↑ 1.0 1 20,556

Index Scan using uchast_pkey on uchast uch (cost=0.43..2.44 rows=1 width=24) (actual time=0.379..0.380 rows=1 loops=20,556)

  • Index Cond: (uchast_id = decis.uchast_id)
27. 1,192.248 1,192.248 ↓ 0.0 0 20,556

Index Scan using kart_ul_pkey on kart_ul ul (cost=0.42..2.05 rows=1 width=17) (actual time=0.057..0.058 rows=0 loops=20,556)

  • Index Cond: (id = uch.ul_id)
28. 17,883.720 17,883.720 ↑ 1.0 1 20,556

Index Scan using kart_fl_pkey on kart_fl fl (cost=0.43..2.06 rows=1 width=19) (actual time=0.870..0.870 rows=1 loops=20,556)

  • Index Cond: (id = uch.fl_id)
29. 8,016.840 8,016.840 ↑ 1.0 448 20,556

Seq Scan on s_stotv st (cost=0.00..61.49 rows=449 width=143) (actual time=0.004..0.390 rows=448 loops=20,556)

30.          

SubPlan (for Nested Loop Left Join)

31. 125.066 49,909.968 ↑ 1.0 1 20,556

Nested Loop (cost=0.87..5.71 rows=1 width=12) (actual time=2.406..2.428 rows=1 loops=20,556)

32. 32,005.692 32,005.692 ↑ 1.0 1 20,556

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..2.85 rows=1 width=6) (actual time=1.552..1.557 rows=1 loops=20,556)

  • Index Cond: (vehs_id = viol.vehs_id)
33. 17,779.210 17,779.210 ↑ 1.0 1 20,554

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..2.85 rows=1 width=18) (actual time=0.848..0.865 rows=1 loops=20,554)

  • Index Cond: (id = v_1.regno_id)
34. 760.572 760.572 ↑ 1.0 1 20,556

Index Scan using s_stotv_pkey on s_stotv stotv (cost=0.27..2.69 rows=1 width=15) (actual time=0.036..0.037 rows=1 loops=20,556)

  • Index Cond: (stotv_id = p.stotv_id)
35. 143.892 143.892 ↑ 1.0 1 20,556

Seq Scan on s_sstad_delo sd (cost=0.00..1.09 rows=1 width=118) (actual time=0.006..0.007 rows=1 loops=20,556)

  • Filter: (delo_s.stad_delo_kod = stad_delo_kod)
  • Rows Removed by Filter: 6
36. 287.784 287.784 ↑ 1.0 1 20,556

Seq Scan on s_interaction_type it (cost=0.00..1.02 rows=1 width=32) (actual time=0.013..0.014 rows=1 loops=20,556)

  • Filter: (id = c.interaction_type)
  • Rows Removed by Filter: 1
37. 164.448 164.448 ↑ 1.0 1 20,556

Seq Scan on s_suchast_status status (cost=0.00..1.04 rows=1 width=118) (actual time=0.007..0.008 rows=1 loops=20,556)

  • Filter: (uchast_status = uch.uchast_status)
  • Rows Removed by Filter: 2
38. 123.336 123.336 ↑ 1.0 1 20,556

Seq Scan on s_case_status cs (cost=0.00..1.23 rows=1 width=32) (actual time=0.005..0.006 rows=1 loops=20,556)

  • Filter: (id = c.status)
  • Rows Removed by Filter: 17
39. 177.636 177.636 ↑ 1.0 1 14,803

Seq Scan on s_sdecis ssd (cost=0.00..1.46 rows=1 width=54) (actual time=0.012..0.012 rows=1 loops=14,803)

  • Filter: (court_decis.decis_kod = decis_kod)
  • Rows Removed by Filter: 36
40. 185.004 185.004 ↓ 0.0 0 20,556

Seq Scan on s_return_reason ret (cost=0.00..1.35 rows=1 width=32) (actual time=0.009..0.009 rows=0 loops=20,556)

  • Filter: (id = vozv.court_return_reason_id)
  • Rows Removed by Filter: 28
Planning time : 14.286 ms
Execution time : 860,471.863 ms