explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cvoz

Settings
# exclusive inclusive rows x rows loops node
1. 1.962 33,052.207 ↓ 212.8 2,128 1

Unique (cost=2,954.38..2,954.53 rows=10 width=410) (actual time=33,047.108..33,052.207 rows=2,128 loops=1)

2. 37.140 33,050.245 ↓ 664.3 6,643 1

Sort (cost=2,954.38..2,954.41 rows=10 width=410) (actual time=33,047.106..33,050.245 rows=6,643 loops=1)

  • Sort Key: b.gid, b.the_geom, ks.kods, ks.nosaukums, tat.statuss
  • Sort Method: external merge Disk: 6,840kB
3. 2,907.688 33,013.105 ↓ 664.3 6,643 1

Nested Loop (cost=1.37..2,954.21 rows=10 width=410) (actual time=3,696.887..33,013.105 rows=6,643 loops=1)

  • Join Filter: (f_zemesgabali_query.mip_id = f_ipasumi_query.mip_id)
  • Rows Removed by Join Filter: 37,809,248
4. 19.314 19.314 ↓ 5.7 5,667 1

Function Scan on f_ipasumi_query (cost=0.25..10.25 rows=1,000 width=4) (actual time=15.086..19.314 rows=5,667 loops=1)

5. 26,460.264 30,086.103 ↓ 3,336.5 6,673 5,667

Materialize (cost=1.12..2,913.97 rows=2 width=414) (actual time=0.017..5.309 rows=6,673 loops=5,667)

6. 8.207 3,625.839 ↓ 3,336.5 6,673 1

Nested Loop (cost=1.12..2,913.96 rows=2 width=414) (actual time=39.194..3,625.839 rows=6,673 loops=1)

7. 8.736 3,470.826 ↓ 3,336.5 6,673 1

Nested Loop (cost=1.12..2,891.89 rows=2 width=33) (actual time=39.028..3,470.826 rows=6,673 loops=1)

  • Join Filter: (tat.activity_k_id = ks.id)
  • Rows Removed by Join Filter: 41,398
8. 0.000 3,462.090 ↓ 1,319.1 13,191 1

Nested Loop (cost=1.12..2,889.62 rows=10 width=16) (actual time=38.580..3,462.090 rows=13,191 loops=1)

9. 40.410 3,369.144 ↓ 1,300.3 52,014 1

Nested Loop (cost=0.83..2,874.86 rows=40 width=12) (actual time=36.189..3,369.144 rows=52,014 loops=1)

10. 14.588 3,276.681 ↓ 1,301.3 52,053 1

Nested Loop (cost=0.54..2,862.11 rows=40 width=8) (actual time=36.185..3,276.681 rows=52,053 loops=1)

11. 63.046 2,584.332 ↓ 1,269.2 677,761 1

Nested Loop (cost=0.25..2,690.39 rows=534 width=8) (actual time=36.011..2,584.332 rows=677,761 loops=1)

12. 50.446 50.446 ↓ 1,784.0 8,920 1

Function Scan on f_zemesgabali_query (cost=0.25..12.75 rows=5 width=8) (actual time=35.962..50.446 rows=8,920 loops=1)

  • Filter: (zg_status = 0)
  • Rows Removed by Filter: 324
13. 321.120 2,470.840 ↑ 1.7 76 8,920

Append (cost=0.00..534.22 rows=131 width=8) (actual time=0.025..0.277 rows=76 loops=8,920)

14. 0.000 0.000 ↓ 0.0 0 8,920

Seq Scan on tbl_management_units b2 (cost=0.00..0.00 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Filter: (f_zemesgabali_query.zgab_id = cadastral_sys_id)
15. 321.120 356.800 ↑ 1.4 10 8,920

Bitmap Heap Scan on tbl_management_units_1_0_lv b2_1 (cost=4.40..59.01 rows=14 width=8) (actual time=0.013..0.040 rows=10 loops=8,920)

  • Recheck Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
  • Heap Blocks: exact=38,762
16. 35.680 35.680 ↑ 1.4 10 8,920

Bitmap Index Scan on idx_cadastral_sys_id_1_0_lv (cost=0.00..4.40 rows=14 width=0) (actual time=0.004..0.004 rows=10 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
17. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_0_ee on tbl_management_units_0_ee b2_2 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
18. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_0_lt on tbl_management_units_0_lt b2_3 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
19. 187.320 187.320 ↑ 1.0 3 8,920

Index Scan using idx_cadastral_sys_id_0_lv on tbl_management_units_0_lv b2_4 (cost=0.29..16.26 rows=3 width=8) (actual time=0.009..0.021 rows=3 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
20. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_0_ee on tbl_management_units_1_0_ee b2_5 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
21. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_0_lt on tbl_management_units_1_0_lt b2_6 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
22. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_1_ee on tbl_management_units_1_1_ee b2_7 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
23. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_1_lt on tbl_management_units_1_1_lt b2_8 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
24. 1,293.400 1,293.400 ↑ 1.5 58 8,920

Index Scan using idx_cadastral_sys_id_1_1_lv on tbl_management_units_1_1_lv b2_9 (cost=0.42..345.92 rows=87 width=8) (actual time=0.015..0.145 rows=58 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
25. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_proj_ee on tbl_management_units_1_proj_ee b2_10 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
26. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_proj_lt on tbl_management_units_1_proj_lt b2_11 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
27. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_1_proj_lv on tbl_management_units_1_proj_lv b2_12 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
28. 8.920 17.840 ↓ 0.0 0 8,920

Bitmap Heap Scan on tbl_management_units_3_0 b2_13 (cost=1.76..9.02 rows=2 width=8) (actual time=0.001..0.002 rows=0 loops=8,920)

  • Recheck Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
  • Heap Blocks: exact=305
29. 8.920 8.920 ↓ 0.0 0 8,920

Bitmap Index Scan on idx_cadastral_sys_id_3_0 (cost=0.00..1.76 rows=2 width=0) (actual time=0.001..0.001 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
30. 35.680 44.600 ↓ 0.0 0 8,920

Bitmap Heap Scan on tbl_management_units_3_1 b2_14 (cost=4.33..30.82 rows=7 width=8) (actual time=0.002..0.005 rows=0 loops=8,920)

  • Recheck Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
  • Heap Blocks: exact=3,235
31. 8.920 8.920 ↓ 0.0 0 8,920

Bitmap Index Scan on idx_cadastral_sys_id_3_1 (cost=0.00..4.33 rows=7 width=0) (actual time=0.001..0.001 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
32. 0.000 0.000 ↓ 0.0 0 8,920

Index Scan using idx_cadastral_sys_id_3_proj on tbl_management_units_3_proj b2_15 (cost=0.14..4.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
33. 231.920 249.760 ↑ 1.8 4 8,920

Bitmap Heap Scan on tbl_management_units_sketches b2_16 (cost=4.34..31.58 rows=7 width=8) (actual time=0.007..0.028 rows=4 loops=8,920)

  • Recheck Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
  • Heap Blocks: exact=33,437
34. 17.840 17.840 ↑ 1.8 4 8,920

Bitmap Index Scan on idx_cadastral_sys_id_sketches (cost=0.00..4.34 rows=7 width=0) (actual time=0.002..0.002 rows=4 loops=8,920)

  • Index Cond: (cadastral_sys_id = f_zemesgabali_query.zgab_id)
35. 677.761 677.761 ↓ 0.0 0 677,761

Index Scan using nogab_gid_idx on tbl_activities_compartments tacs (cost=0.29..0.31 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=677,761)

  • Index Cond: (nogab_gid = b2.gid)
36. 52.053 52.053 ↑ 1.0 1 52,053

Index Scan using tbl_activities_compartments_pkey on tbl_activities_compartment tac (cost=0.29..0.32 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=52,053)

  • Index Cond: (id = tacs.activity_cmprt)
37. 104.028 104.028 ↓ 0.0 0 52,014

Index Scan using tbl_activities_teritorial_id_idx on tbl_activities_teritorial tat (cost=0.29..0.37 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=52,014)

  • Index Cond: (id = tac.pasak_id)
  • Filter: (statuss < 3)
  • Rows Removed by Filter: 1
38. 0.000 0.000 ↑ 1.2 4 13,191

Materialize (cost=0.00..1.53 rows=5 width=25) (actual time=0.000..0.000 rows=4 loops=13,191)

39. 0.028 0.028 ↓ 1.2 6 1

Seq Scan on klas_saimndarbibas ks (cost=0.00..1.51 rows=5 width=25) (actual time=0.021..0.028 rows=6 loops=1)

  • Filter: (((kods)::text >= '300'::text) AND ((kods)::text < '500'::text) AND (nozare = 1))
  • Rows Removed by Filter: 23
40. 73.403 146.806 ↑ 17.0 1 6,673

Append (cost=0.00..10.86 rows=17 width=385) (actual time=0.022..0.022 rows=1 loops=6,673)

41. 0.000 0.000 ↓ 0.0 0 6,673

Seq Scan on tbl_management_units b (cost=0.00..0.00 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Filter: (tac.nogab_gid = gid)
42. 13.346 13.346 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_0_lv_gid_idx on tbl_management_units_1_0_lv b_1 (cost=0.29..2.16 rows=1 width=305) (actual time=0.002..0.002 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
43. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_0_ee_gid_idx on tbl_management_units_0_ee b_2 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
44. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_0_lt_gid_idx on tbl_management_units_0_lt b_3 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
45. 6.673 6.673 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_0_lv_gid_idx on tbl_management_units_0_lv b_4 (cost=0.29..1.23 rows=1 width=1,432) (actual time=0.001..0.001 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
46. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_0_ee_gid_idx on tbl_management_units_1_0_ee b_5 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
47. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_0_lt_gid_idx on tbl_management_units_1_0_lt b_6 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
48. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_1_ee_gid_idx on tbl_management_units_1_1_ee b_7 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
49. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_1_lt_gid_idx on tbl_management_units_1_1_lt b_8 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
50. 13.346 13.346 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_1_lv_gid_idx on tbl_management_units_1_1_lv b_9 (cost=0.42..4.06 rows=1 width=302) (actual time=0.002..0.002 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
51. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_proj_ee_gid_idx on tbl_management_units_1_proj_ee b_10 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
52. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_proj_lt_gid_idx on tbl_management_units_1_proj_lt b_11 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
53. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_1_proj_lv_gid_idx on tbl_management_units_1_proj_lv b_12 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
54. 6.673 6.673 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_3_0_gid_idx on tbl_management_units_3_0 b_13 (cost=0.15..0.19 rows=1 width=2,987) (actual time=0.001..0.001 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
55. 6.673 6.673 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_3_1_gid_idx on tbl_management_units_3_1 b_14 (cost=0.28..0.52 rows=1 width=2,854) (actual time=0.001..0.001 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
56. 0.000 0.000 ↓ 0.0 0 6,673

Index Scan using tbl_management_units_3_proj_gid_idx on tbl_management_units_3_proj b_15 (cost=0.14..0.16 rows=1 width=36) (actual time=0.000..0.000 rows=0 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
57. 26.692 26.692 ↑ 1.0 1 6,673

Index Scan using tbl_management_units_sketches_gid_idx on tbl_management_units_sketches b_16 (cost=0.29..1.09 rows=1 width=588) (actual time=0.004..0.004 rows=1 loops=6,673)

  • Index Cond: (gid = tac.nogab_gid)
Planning time : 5.850 ms
Execution time : 33,057.901 ms