explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lGA

Settings
# exclusive inclusive rows x rows loops node
1. 2,740.824 4,286.911 ↓ 3,666.0 3,666 1

Merge Right Join (cost=18,140.83..38,022.73 rows=1 width=2,268) (actual time=32.244..4,286.911 rows=3,666 loops=1)

  • Merge Cond: (delo_tags.delo_id = d.delo_id)
2. 8.767 15.626 ↓ 2.1 2,982 1

GroupAggregate (cost=0.57..9,167.46 rows=1,411 width=38) (actual time=0.157..15.626 rows=2,982 loops=1)

  • Group Key: delo_tags.delo_id
3. 6.859 6.859 ↓ 2.1 2,982 1

Index Scan using delo_tags_delo_id on delo_tags (cost=0.57..9,142.76 rows=1,412 width=11) (actual time=0.131..6.859 rows=2,982 loops=1)

  • Index Cond: ((delo_id >= '72000'::numeric) AND (delo_id <= '75000'::numeric))
  • Filter: (card_category = '1'::numeric)
4. 9.076 1,438.811 ↓ 3,666.0 3,666 1

Materialize (cost=18,140.26..28,815.75 rows=1 width=1,827) (actual time=27.353..1,438.811 rows=3,666 loops=1)

5. 4.958 1,429.735 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,140.26..28,815.74 rows=1 width=1,827) (actual time=27.344..1,429.735 rows=3,666 loops=1)

6. 6.085 1,373.453 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,139.83..28,815.28 rows=1 width=1,777) (actual time=27.288..1,373.453 rows=3,666 loops=1)

7. 3.492 1,345.372 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,139.40..28,814.70 rows=1 width=1,761) (actual time=27.210..1,345.372 rows=3,666 loops=1)

8. 5.738 1,330.882 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,139.25..28,814.53 rows=1 width=1,738) (actual time=27.195..1,330.882 rows=3,666 loops=1)

9. 2.599 1,075.856 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,138.82..28,814.06 rows=1 width=1,640) (actual time=27.129..1,075.856 rows=3,666 loops=1)

10. 2.736 988.939 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,138.39..28,805.73 rows=1 width=1,614) (actual time=27.058..988.939 rows=3,666 loops=1)

11. 4.831 967.873 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,137.96..28,805.28 rows=1 width=1,603) (actual time=27.054..967.873 rows=3,666 loops=1)

12. 2.705 266.502 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,137.53..28,804.77 rows=1 width=1,590) (actual time=0.434..266.502 rows=3,666 loops=1)

13. 5.270 227.137 ↓ 3,666.0 3,666 1

Nested Loop (cost=18,137.10..28,796.37 rows=1 width=1,556) (actual time=0.362..227.137 rows=3,666 loops=1)

  • Join Filter: (v.delo_id = d.delo_id)
14. 5.027 163.211 ↓ 3,666.0 3,666 1

Nested Loop Left Join (cost=18,136.54..28,787.84 rows=1 width=1,122) (actual time=0.285..163.211 rows=3,666 loops=1)

15. 10.575 66.534 ↓ 3,666.0 3,666 1

Merge Join (cost=0.87..10,640.18 rows=1 width=694) (actual time=0.220..66.534 rows=3,666 loops=1)

  • Merge Cond: (v.delo_id = p.delo_id)
16. 35.693 35.693 ↓ 1.4 2,982 1

Index Scan using viol_pk on viol v (cost=0.43..2,882.07 rows=2,182 width=38) (actual time=0.097..35.693 rows=2,982 loops=1)

  • Index Cond: ((delo_id >= '72000'::numeric) AND (delo_id <= '75000'::numeric))
17. 20.266 20.266 ↓ 1.0 3,666 1

Index Scan using docs_other_delo_id on docs_other p (cost=0.43..7,832.36 rows=3,571 width=656) (actual time=0.116..20.266 rows=3,666 loops=1)

  • Index Cond: ((delo_id >= '72000'::numeric) AND (delo_id <= '75000'::numeric))
18. 25.364 91.650 ↓ 0.0 0 3,666

Nested Loop (cost=18,135.67..18,147.65 rows=1 width=435) (actual time=0.019..0.025 rows=0 loops=3,666)

  • Join Filter: (ds.decis_id = (max(decis.decis_id)))
  • Rows Removed by Join Filter: 50
19. 21.996 21.996 ↓ 0.0 0 3,666

Index Scan using decis_docs_other_id on decis ds (cost=0.43..7.92 rows=1 width=435) (actual time=0.006..0.006 rows=0 loops=3,666)

  • Index Cond: (p.docs_id = docs_other_id)
20. 20.290 44.290 ↓ 2.1 430 430

HashAggregate (cost=18,135.24..18,137.24 rows=200 width=32) (actual time=0.057..0.103 rows=430 loops=430)

  • Group Key: max(decis.decis_id)
21. 0.140 24.000 ↑ 1.3 430 1

GroupAggregate (cost=18,118.77..18,128.37 rows=549 width=45) (actual time=23.839..24.000 rows=430 loops=1)

  • Group Key: decis.decis_id
22. 0.203 23.860 ↑ 1.3 430 1

Sort (cost=18,118.77..18,120.14 rows=549 width=13) (actual time=23.829..23.860 rows=430 loops=1)

  • Sort Key: decis.decis_id
  • Sort Method: quicksort Memory: 45kB
23. 22.943 23.657 ↑ 1.3 430 1

Bitmap Heap Scan on decis (cost=147.43..18,093.78 rows=549 width=13) (actual time=0.990..23.657 rows=430 loops=1)

  • Recheck Cond: ((delo_id >= '72000'::numeric) AND (delo_id <= '75000'::numeric))
  • Filter: (docs_other_id IS NOT NULL)
  • Rows Removed by Filter: 2,982
  • Heap Blocks: exact=2,474
24. 0.714 0.714 ↑ 1.4 3,413 1

Bitmap Index Scan on decis_delo_id (cost=0.00..147.29 rows=4,673 width=0) (actual time=0.714..0.714 rows=3,413 loops=1)

  • Index Cond: ((delo_id >= '72000'::numeric) AND (delo_id <= '75000'::numeric))
25. 58.656 58.656 ↑ 1.0 1 3,666

Index Scan using delo_pkey on delo d (cost=0.56..8.52 rows=1 width=446) (actual time=0.015..0.016 rows=1 loops=3,666)

  • Index Cond: (delo_id = p.delo_id)
26. 36.660 36.660 ↑ 1.0 1 3,666

Index Scan using uchast_pkey on uchast u (cost=0.43..8.39 rows=1 width=40) (actual time=0.009..0.010 rows=1 loops=3,666)

  • Index Cond: (v.lvok_id = uchast_id)
27. 696.540 696.540 ↑ 1.0 1 3,666

Index Scan using kart_fl_pkey on kart_fl kf (cost=0.43..0.50 rows=1 width=19) (actual time=0.190..0.190 rows=1 loops=3,666)

  • Index Cond: (u.fl_id = id)
28. 18.330 18.330 ↓ 0.0 0 3,666

Index Scan using kart_ul_pkey on kart_ul ku (cost=0.42..0.45 rows=1 width=17) (actual time=0.005..0.005 rows=0 loops=3,666)

  • Index Cond: (u.ul_id = id)
29. 84.318 84.318 ↑ 1.0 1 3,666

Index Scan using kart_place_pkey on kart_place kp (cost=0.43..8.32 rows=1 width=32) (actual time=0.022..0.023 rows=1 loops=3,666)

  • Index Cond: (v.place_nar_id = id)
30. 249.288 249.288 ↑ 1.0 1 3,666

Index Scan using kart_adr_pkey on kart_adr ka (cost=0.43..0.47 rows=1 width=110) (actual time=0.068..0.068 rows=1 loops=3,666)

  • Index Cond: (kp.adr_id = id)
31. 10.998 10.998 ↑ 1.0 1 3,666

Index Scan using kadr_region_id on kadr_region (cost=0.14..0.16 rows=1 width=28) (actual time=0.003..0.003 rows=1 loops=3,666)

  • Index Cond: (ka.region_id = region_id)
32. 21.996 21.996 ↑ 1.0 1 3,666

Index Scan using vehs_pkey on vehs v_1 (cost=0.43..0.57 rows=1 width=29) (actual time=0.006..0.006 rows=1 loops=3,666)

  • Index Cond: (vehs_id = u.vehs_id)
33. 51.324 51.324 ↑ 1.0 1 3,666

Index Scan using kart_amtc_pk on kart_amtc kt (cost=0.43..0.46 rows=1 width=71) (actual time=0.013..0.014 rows=1 loops=3,666)

  • Index Cond: (v_1.tc_id = id)
34.          

SubPlan (for Merge Right Join)

35. 29.328 29.328 ↑ 1.0 1 3,666

Index Scan using kart_docs_pkey on kart_docs kdr (cost=0.43..8.45 rows=1 width=12) (actual time=0.008..0.008 rows=1 loops=3,666)

  • Index Cond: (v_1.regno_id = id)
36. 10.998 10.998 ↑ 1.0 1 3,666

Seq Scan on avt_stiptc (cost=0.00..1.14 rows=1 width=78) (actual time=0.002..0.003 rows=1 loops=3,666)

  • Filter: ((priz_arh IS NULL) AND ((tiptc_kod)::text = (kt.tiptc_kod)::text))
  • Rows Removed by Filter: 10
37. 40.326 40.326 ↑ 1.0 1 3,666

Seq Scan on avt_stipkuz (cost=0.00..2.01 rows=1 width=30) (actual time=0.004..0.011 rows=1 loops=3,666)

  • Filter: ((priz_arh IS NULL) AND (tipkuz_kod = kt.tipkuz_kod))
  • Rows Removed by Filter: 80
38. 7.332 7.332 ↑ 1.0 1 3,666

Seq Scan on s_licence_plate_groups (cost=0.00..1.07 rows=1 width=78) (actual time=0.001..0.002 rows=1 loops=3,666)

  • Filter: (v_1.regno_group_id = id)
  • Rows Removed by Filter: 5
39. 3.666 3.666 ↓ 0.0 0 3,666

Index Scan using kart_fl_pkey on kart_fl pkf (cost=0.43..8.70 rows=1 width=32) (actual time=0.001..0.001 rows=0 loops=3,666)

  • Index Cond: (id = p.vs_fl_id)
Planning time : 32.415 ms
Execution time : 4,288.160 ms