explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 5.606 36,703.845 ↓ 1,909.0 1,909 1

HashAggregate (cost=1,846.85..1,847.13 rows=1 width=33) (actual time=36,703.286..36,703.845 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. 93.439 36,698.239 ↓ 1,909.0 1,909 1

Nested Loop (cost=50.35..1,846.83 rows=1 width=33) (actual time=31.901..36,698.239 rows=1,909 loops=1)

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

Nested Loop (cost=49.93..178.63 rows=1 width=61) (actual time=0.277..9.270 rows=1,909 loops=1)

4. 0.179 0.404 ↓ 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.233..0.404 rows=102 loops=1)

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

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

6. 0.020 0.020 ↑ 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.020..0.020 rows=102 loops=1)

  • Index Cond: (grupo = 101655)
7. 0.201 0.201 ↑ 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.201..0.201 rows=1,456 loops=1)

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

Bitmap Heap Scan on pln_cmc_integrator pci (cost=9.42..13.43 rows=1 width=42) (actual time=0.052..0.066 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.234 4.896 ↓ 0.0 0 102

BitmapAnd (cost=9.42..9.42 rows=1 width=0) (actual time=0.048..0.048 rows=0 loops=102)

10. 1.428 1.428 ↓ 1.9 19 102

Bitmap Index Scan on in_pln_cmc_integrator_id_cmc_meter (cost=0.00..4.51 rows=10 width=0) (actual time=0.014..0.014 rows=19 loops=102)

  • Index Cond: (id_cmc_meter = cvpc.id_cmc_meter)
11. 3.234 3.234 ↓ 1.5 20 98

Bitmap Index Scan on idx_pln_cmc_integrator (cost=0.00..4.66 rows=13 width=0) (actual time=0.033..0.033 rows=20 loops=98)

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

Index Scan using uk_meter_pod_multipoint on cmc_meter cm (cost=0.42..1,667.93 rows=1 width=26) (actual time=19.117..19.170 rows=1 loops=1,909)

  • Index Cond: ((code_meter)::text = (pci.code_meter)::text)