explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lU3K : Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: Optimization for: plan #Fbt; plan #xf1jV; plan #Kw0d; plan #Mj6U; plan #P1MF; plan #73Cq; plan #QW2d

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 2.917 163.981 ↓ 1,909.0 1,909 1

HashAggregate (cost=179.19..179.47 rows=1 width=33) (actual time=163.259..163.981 rows=1,909 loops=1)

  • Group Key: cm.id_meter, pci.code_integrator_meter_type, pci.min_reading_value, pci.max_reading_value, pci.previous_reading_value, (cvpc.kmaxima)::numeric(7,3), 'load_process_itine'::text, now(), f_pci_get_integrator_meter_sort((pci.code_integrator_meter_type)::integer)
2. 111.985 161.064 ↓ 1,909.0 1,909 1

Nested Loop (cost=50.33..179.17 rows=1 width=33) (actual time=0.861..161.064 rows=1,909 loops=1)

  • Join Filter: ((cvpc.code_meter)::text = (cm.code_meter)::text)
3. 0.941 8.990 ↓ 1,909.0 1,909 1

Nested Loop (cost=49.91..178.45 rows=1 width=61) (actual time=0.569..8.990 rows=1,909 loops=1)

4. 0.130 0.603 ↓ 12.8 102 1

Bitmap Heap Scan on v_m_pci_principal_carga cvpc (cost=40.51..71.08 rows=8 width=35) (actual time=0.486..0.603 rows=102 loops=1)

  • Recheck Cond: ((grupo = 101655) AND (territorio = 'ERZ'::text))
  • Heap Blocks: exact=37
5. 0.009 0.473 ↓ 0.0 0 1

BitmapAnd (cost=40.51..40.51 rows=8 width=0) (actual time=0.473..0.473 rows=0 loops=1)

6. 0.037 0.037 ↑ 1.0 102 1

Bitmap Index Scan on in_v_m_pci_principal_carga_grupo (cost=0.00..5.05 rows=102 width=0) (actual time=0.037..0.037 rows=102 loops=1)

  • Index Cond: (grupo = 101655)
7. 0.427 0.427 ↑ 1.0 1,456 1

Bitmap Index Scan on in_v_m_pci_principal_carga_territorio (cost=0.00..35.21 rows=1,456 width=0) (actual time=0.427..0.427 rows=1,456 loops=1)

  • Index Cond: (territorio = 'ERZ'::text)
8. 1.020 7.446 ↓ 19.0 19 102

Bitmap Heap Scan on pln_cmc_integrator pci (cost=9.40..13.41 rows=1 width=42) (actual time=0.066..0.073 rows=19 loops=102)

  • Recheck Cond: ((id_cmc_meter = cvpc.id_cmc_meter) AND ((code_meter)::text = (cvpc.code_meter)::text))
  • Heap Blocks: exact=261
9. 0.230 6.426 ↓ 0.0 0 102

BitmapAnd (cost=9.40..9.40 rows=1 width=0) (actual time=0.063..0.063 rows=0 loops=102)

10. 3.060 3.060 ↓ 2.1 19 102

Bitmap Index Scan on in_pln_cmc_integrator_id_cmc_meter (cost=0.00..4.50 rows=9 width=0) (actual time=0.030..0.030 rows=19 loops=102)

  • Index Cond: (id_cmc_meter = cvpc.id_cmc_meter)
11. 3.136 3.136 ↓ 1.8 20 98

Bitmap Index Scan on idx_pln_cmc_integrator (cost=0.00..4.64 rows=11 width=0) (actual time=0.032..0.032 rows=20 loops=98)

  • Index Cond: ((code_meter)::text = (cvpc.code_meter)::text)
12. 40.089 40.089 ↑ 1.0 1 1,909

Index Scan using in_cmc_meter_code_meter on cmc_meter cm (cost=0.42..0.44 rows=1 width=26) (actual time=0.019..0.021 rows=1 loops=1,909)

  • Index Cond: ((code_meter)::text = (pci.code_meter)::text)
Planning time : 98.521 ms
Execution time : 164.284 ms