explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4.425 29,987.461 ↓ 1,909.0 1,909 1

HashAggregate (cost=1,846.85..1,847.13 rows=1 width=33) (actual time=29,986.725..29,987.461 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. 71.882 29,983.036 ↓ 1,909.0 1,909 1

Nested Loop (cost=50.35..1,846.83 rows=1 width=33) (actual time=27.032..29,983.036 rows=1,909 loops=1)

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

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

4. 0.196 0.664 ↓ 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.482..0.664 rows=102 loops=1)

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

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

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

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

  • Index Cond: (territorio = 'ERZ'::text)
8. 1.428 6.324 ↓ 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.062 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.238 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.326 1.326 ↓ 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.013..0.013 rows=19 loops=102)

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

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

  • Index Cond: ((code_meter)::text = (cvpc.code_meter)::text)
12. 29,902.576 29,902.576 ↑ 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=15.599..15.664 rows=1 loops=1,909)

  • Index Cond: ((code_meter)::text = (pci.code_meter)::text)
Planning time : 6.929 ms
Execution time : 29,987.710 ms