explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KBMp

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 7.553 ↑ 1.0 25 1

Limit (cost=0.42..13,977.95 rows=25 width=596) (actual time=0.869..7.553 rows=25 loops=1)

2. 0.031 7.542 ↑ 2,594.2 25 1

Unique (cost=0.42..36,260,504.20 rows=64,855 width=596) (actual time=0.869..7.542 rows=25 loops=1)

3. 0.419 7.511 ↑ 2,594.2 25 1

Nested Loop Left Join (cost=0.42..36,260,342.06 rows=64,855 width=596) (actual time=0.867..7.511 rows=25 loops=1)

  • Join Filter: ((tc."IS_ACTIVE" = 1) AND (tp."ID" = rls."TYPE_POINT"))
  • Rows Removed by Join Filter: 1875
4. 1.834 5.542 ↑ 2,594.2 25 1

Nested Loop Left Join (cost=0.42..1,037,939.48 rows=64,855 width=504) (actual time=0.726..5.542 rows=25 loops=1)

  • Join Filter: (adr."ID" = pom."ADRESS")
  • Rows Removed by Join Filter: 11500
5. 1.757 2.758 ↑ 2,594.2 25 1

Nested Loop Left Join (cost=0.42..591,392.76 rows=64,855 width=422) (actual time=0.357..2.758 rows=25 loops=1)

  • Join Filter: (pom."ID" = rls."POMESHENIE")
  • Rows Removed by Join Filter: 11500
6. 0.034 0.126 ↑ 2,594.2 25 1

Nested Loop (cost=0.42..143,876.36 rows=64,855 width=422) (actual time=0.038..0.126 rows=25 loops=1)

  • Join Filter: (rls."TYPE_SCHET" = tc."ID")
  • Rows Removed by Join Filter: 31
7. 0.067 0.067 ↑ 15,738.8 25 1

Index Scan using "REF_LIC_SCHET_pkey" on "REF_LIC_SCHET" rls (cost=0.42..137,973.18 rows=393,471 width=184) (actual time=0.018..0.067 rows=25 loops=1)

  • Filter: (("IS_ACTIVE" = 1) AND ("ZONE" = ANY ('{35cccc5c-bc1d-4749-a931-cde5b007b1ab,50685375-87da-46e1-a4a2-1ac93326f315,3bdd57d8-e907-45a3-b110-880625c71087,fa7d76f0-e820-4233-b3c2-3b801336112f,f37b16c4-b7e0-4244-bb00-0d51edf21a7b,666ed72f-c9c4-4f1b-a7ed-e194786cc46b,a95141d0-024c-4570-bfaf-a9dce78eaddb,ded5d225-e7c7-4663-8767-aeb591e3fcfa,e9644267-3ca2-4cdd-ab41-1f9124321733,0152bb3c-89b2-4ff7-83b1-73750d0a7551,2efd2bf1-4eb8-4a2a-9be8-8955dd806a32,a560e43c-e831-46c2-bb70-9bbae431535c,43b0983d-0b70-4990-9dad-bde38bc36da8,1eff350e-cd8c-414f-8f30-bb4e08566a52,25f5f029-bcff-42cd-930b-2b733c8f937a,60a348d1-a659-4a78-a1d3-4efc6fa18c37,adc173bf-7b39-4106-bdfb-49c42e30cfca,91b83dde-5669-4b70-bd3f-aa907431a07a,9fdf5315-d8ac-41a3-b45f-5f8e777100b9,1722a2de-d149-4e08-8b78-ff603d4a5f71,f4e3038c-c22f-4b8f-b23c-8c6395a346c1,524775e9-a88f-4a8a-9e26-08a4305c4568,933793fc-6289-47bf-a53e-af884c597e8a}'::uuid[])))
8. 0.011 0.025 ↓ 2.0 2 25

Materialize (cost=0.00..1.12 rows=1 width=270) (actual time=0.001..0.001 rows=2 loops=25)

9. 0.014 0.014 ↓ 4.0 4 1

Seq Scan on "REF_TYPE_COUNTERS" tc (cost=0.00..1.11 rows=1 width=270) (actual time=0.011..0.014 rows=4 loops=1)

  • Filter: (("IS_ACTIVE" = 1) AND (("ICON_NAME")::text = ANY ('{w-hot,w-cold,gaz,colorimetr,electro}'::text[])))
  • Rows Removed by Filter: 1
10. 0.718 0.875 ↑ 1.0 460 25

Materialize (cost=0.00..18.05 rows=460 width=32) (actual time=0.001..0.035 rows=460 loops=25)

11. 0.157 0.157 ↑ 1.0 460 1

Seq Scan on "REF_POMESCHENIE" pom (cost=0.00..15.75 rows=460 width=32) (actual time=0.010..0.157 rows=460 loops=1)

  • Filter: ("IS_ACTIVE" = 1)
12. 0.787 0.950 ↑ 1.0 460 25

Materialize (cost=0.00..17.05 rows=460 width=114) (actual time=0.001..0.038 rows=460 loops=25)

13. 0.163 0.163 ↑ 1.0 460 1

Seq Scan on "REG_ADDRESS" adr (cost=0.00..14.75 rows=460 width=114) (actual time=0.013..0.163 rows=460 loops=1)

  • Filter: ("IS_ACTIVE" = 1)
14. 0.125 0.150 ↑ 1.0 75 25

Materialize (cost=0.00..3.13 rows=75 width=62) (actual time=0.001..0.006 rows=75 loops=25)

15. 0.025 0.025 ↑ 1.0 75 1

Seq Scan on "REF_TYPE_POINT" tp (cost=0.00..2.75 rows=75 width=62) (actual time=0.011..0.025 rows=75 loops=1)

16.          

SubPlan (for Nested Loop Left Join)

17. 0.050 0.800 ↓ 0.0 0 25

Limit (cost=270.92..270.92 rows=1 width=36) (actual time=0.031..0.032 rows=0 loops=25)

18. 0.050 0.750 ↓ 0.0 0 25

Sort (cost=270.92..270.97 rows=23 width=36) (actual time=0.030..0.030 rows=0 loops=25)

  • Sort Key: rdm1."DATEON" DESC
  • Sort Method: quicksort Memory: 25kB
19. 0.325 0.700 ↓ 0.0 0 25

Append (cost=4.17..270.80 rows=23 width=36) (actual time=0.021..0.028 rows=0 loops=25)

  • Subplans Removed: 4
20. 0.175 0.175 ↓ 0.0 0 25

Index Scan using "REG_DATA_MONTHS_2019_LIC_SCHET_idx" on "REG_DATA_MONTHS_2019" rdm1 (cost=0.43..74.38 rows=17 width=36) (actual time=0.006..0.007 rows=0 loops=25)

  • Index Cond: ("LIC_SCHET" = rls."ID")
  • Filter: ("DATEON" >= date_trunc('month'::text, (now() - '1 year'::interval)))
21. 0.150 0.150 ↓ 0.0 0 25

Seq Scan on "REG_DATA_MONTHS_2020" rdm1_1 (cost=0.00..1.43 rows=1 width=36) (actual time=0.006..0.006 rows=0 loops=25)

  • Filter: (("LIC_SCHET" = rls."ID") AND ("DATEON" >= date_trunc('month'::text, (now() - '1 year'::interval))))
  • Rows Removed by Filter: 19
22. 0.025 0.050 ↓ 0.0 0 25

Bitmap Heap Scan on "REG_DATA_MONTHS_2021" rdm1_2 (cost=4.17..11.32 rows=1 width=36) (actual time=0.002..0.002 rows=0 loops=25)

  • Recheck Cond: ("LIC_SCHET" = rls."ID")
  • Filter: ("DATEON" >= date_trunc('month'::text, (now() - '1 year'::interval)))
23. 0.025 0.025 ↓ 0.0 0 25

Bitmap Index Scan on "REG_DATA_MONTHS_2021_LIC_SCHET_idx" (cost=0.00..4.17 rows=3 width=0) (actual time=0.001..0.001 rows=0 loops=25)

  • Index Cond: ("LIC_SCHET" = rls."ID")
24. 0.025 0.600 ↓ 0.0 0 25

Limit (cost=270.86..270.86 rows=1 width=36) (actual time=0.024..0.024 rows=0 loops=25)

25. 0.050 0.575 ↓ 0.0 0 25

Sort (cost=270.86..270.92 rows=23 width=36) (actual time=0.023..0.023 rows=0 loops=25)

  • Sort Key: rdm2."DATEON" DESC
  • Sort Method: quicksort Memory: 25kB
26. 0.275 0.525 ↓ 0.0 0 25

Append (cost=4.17..270.74 rows=23 width=36) (actual time=0.016..0.021 rows=0 loops=25)

  • Subplans Removed: 4
27. 0.100 0.100 ↓ 0.0 0 25

Index Scan using "REG_DATA_MONTHS_2019_LIC_SCHET_idx" on "REG_DATA_MONTHS_2019" rdm2 (cost=0.43..74.33 rows=17 width=36) (actual time=0.003..0.004 rows=0 loops=25)

  • Index Cond: ("LIC_SCHET" = rls."ID")
  • Filter: ("DATEON" >= date_trunc('month'::text, (now() - '1 year'::interval)))
28. 0.125 0.125 ↓ 0.0 0 25

Seq Scan on "REG_DATA_MONTHS_2020" rdm2_1 (cost=0.00..1.43 rows=1 width=36) (actual time=0.005..0.005 rows=0 loops=25)

  • Filter: (("LIC_SCHET" = rls."ID") AND ("DATEON" >= date_trunc('month'::text, (now() - '1 year'::interval))))
  • Rows Removed by Filter: 19
29. 0.000 0.025 ↓ 0.0 0 25

Bitmap Heap Scan on "REG_DATA_MONTHS_2021" rdm2_2 (cost=4.17..11.31 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=25)

  • Recheck Cond: ("LIC_SCHET" = rls."ID")
  • Filter: ("DATEON" >= date_trunc('month'::text, (now() - '1 year'::interval)))
30. 0.025 0.025 ↓ 0.0 0 25

Bitmap Index Scan on "REG_DATA_MONTHS_2021_LIC_SCHET_idx" (cost=0.00..4.17 rows=3 width=0) (actual time=0.001..0.001 rows=0 loops=25)

  • Index Cond: ("LIC_SCHET" = rls."ID")
Planning time : 2.385 ms
Execution time : 7.901 ms