explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1nK6

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=5.28..434,400.00 rows=1 width=853) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.84..434,372.02 rows=1 width=231) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.42..434,370.38 rows=1 width=227) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4.00..434,321.68 rows=27 width=133) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.56..434,257.16 rows=27 width=115) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.00..434,207.95 rows=27 width=117) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.56..434,160.91 rows=28 width=85) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.00..433,280.18 rows=486 width=91) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.57..418,902.87 rows=8,578 width=72) (actual rows= loops=)

  • Join Filter: (decis.delo_id = delo_s.delo_id)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.01..337,183.04 rows=41,845 width=50) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Index Scan using decis_det_ogai_kod on decis (cost=0.58..185,182.24 rows=73,971 width=26) (actual rows= loops=)

  • 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. 0.000 0.000 ↓ 0.0

Index Scan using docs_prot_delo_id on docs_prot prot (cost=0.43..2.04 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (delo_id = decis.delo_id)
13. 0.000 0.000 ↓ 0.0

Index Scan using delo_pkey on delo delo_s (cost=0.56..1.94 rows=1 width=34) (actual rows= loops=)

  • Index Cond: (delo_id = prot.delo_id)
14. 0.000 0.000 ↓ 0.0

Index Scan using viol_pk on viol (cost=0.43..1.67 rows=1 width=19) (actual rows= loops=)

  • Index Cond: (delo_id = delo_s.delo_main_id)
15. 0.000 0.000 ↓ 0.0

Index Scan using delo_pkey on delo delo_f (cost=0.56..1.80 rows=1 width=14) (actual rows= loops=)

  • Index Cond: (delo_id = delo_s.delo_main_id)
16. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (docs_id = viol.docs_post_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using decis_docs_post_id on decis shtraf (cost=0.56..1.81 rows=1 width=10) (actual rows= loops=)

  • Index Cond: (docs_post_id = p.docs_id)
  • Filter: (decis_kod = '65'::numeric)
18. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (uchast_id = decis.uchast_id)
19. 0.000 0.000 ↓ 0.0

Index Scan using case_decis_id_un on "case" c (cost=0.42..1.79 rows=1 width=100) (actual rows= loops=)

  • Index Cond: ((decis_id = decis.decis_id) AND (decis_id IS NOT NULL))
20. 0.000 0.000 ↓ 0.0

Index Scan using kart_ul_pkey on kart_ul ul (cost=0.42..1.63 rows=1 width=17) (actual rows= loops=)

  • Index Cond: (id = uch.ul_id)
21. 0.000 0.000 ↓ 0.0

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

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

SubPlan (for Nested Loop Left Join)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.87..5.71 rows=1 width=12) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..2.85 rows=1 width=6) (actual rows= loops=)

  • Index Cond: (vehs_id = viol.vehs_id)
25. 0.000 0.000 ↓ 0.0

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..2.85 rows=1 width=18) (actual rows= loops=)

  • Index Cond: (id = v_1.regno_id)
26. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (stotv_id = p.stotv_id)
27. 0.000 0.000 ↓ 0.0

Seq Scan on s_sstad_delo sd (cost=0.00..1.09 rows=1 width=118) (actual rows= loops=)

  • Filter: (delo_s.stad_delo_kod = stad_delo_kod)
28. 0.000 0.000 ↓ 0.0

Limit (cost=10.29..10.30 rows=1 width=102) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Sort (cost=10.29..10.30 rows=1 width=102) (actual rows= loops=)

  • Sort Key: dc.decis_dat DESC
30. 0.000 0.000 ↓ 0.0

Index Scan using decis_delo_id on decis dc (cost=0.56..10.28 rows=1 width=102) (actual rows= loops=)

  • Index Cond: (delo_id = decis.delo_id)
  • Filter: (organ_sost_kod IS NULL)
31. 0.000 0.000 ↓ 0.0

Seq Scan on s_interaction_type it (cost=0.00..1.02 rows=1 width=32) (actual rows= loops=)

  • Filter: (id = c.interaction_type)
32. 0.000 0.000 ↓ 0.0

Limit (cost=2.99..3.00 rows=1 width=8) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Sort (cost=2.99..3.00 rows=1 width=8) (actual rows= loops=)

  • Sort Key: di.dat_stad_ispoln DESC
34. 0.000 0.000 ↓ 0.0

Index Scan using di_decis_stad on decis_ispoln di (cost=0.56..2.98 rows=1 width=8) (actual rows= loops=)

  • Index Cond: ((decis_id = decis.decis_id) AND (stad_ispoln_kod = '15'::numeric))
35. 0.000 0.000 ↓ 0.0

Seq Scan on s_suchast_status status (cost=0.00..1.04 rows=1 width=118) (actual rows= loops=)

  • Filter: (uchast_status = uch.uchast_status)
36. 0.000 0.000 ↓ 0.0

Seq Scan on s_case_status cs (cost=0.00..1.23 rows=1 width=32) (actual rows= loops=)

  • Filter: (id = c.status)