explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mj6U : Optimization for: Optimization for: Optimization for: plan #Fbt; plan #xf1jV; plan #Kw0d

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 8.847 79,326.728 ↓ 1,909.0 1,909 1

HashAggregate (cost=2,292.52..2,292.80 rows=1 width=33) (actual time=79,326.224..79,326.728 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. 134.061 79,317.881 ↓ 1,909.0 1,909 1

Nested Loop (cost=54.15..2,292.50 rows=1 width=33) (actual time=73.796..79,317.881 rows=1,909 loops=1)

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

Nested Loop (cost=53.73..624.29 rows=1 width=61) (actual time=0.617..27.135 rows=1,909 loops=1)

4. 0.815 1.275 ↓ 3.0 102 1

Bitmap Heap Scan on v_m_pci_principal_carga cvpc (cost=44.31..167.23 rows=34 width=35) (actual time=0.486..1.275 rows=102 loops=1)

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

BitmapAnd (cost=44.31..44.31 rows=34 width=0) (actual time=0.460..0.460 rows=0 loops=1)

6. 0.068 0.068 ↑ 7.4 102 1

Bitmap Index Scan on in_v_m_pci_principal_carga_grupo (cost=0.00..21.97 rows=757 width=0) (actual time=0.068..0.068 rows=102 loops=1)

  • Index Cond: (grupo = 101655)
7. 0.384 0.384 ↓ 1.9 1,456 1

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

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

Bitmap Heap Scan on pln_cmc_integrator pci (cost=9.42..13.43 rows=1 width=42) (actual time=0.128..0.224 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.416 9.282 ↓ 0.0 0 102

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

10. 3.672 3.672 ↓ 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.036..0.036 rows=19 loops=102)

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

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

  • Index Cond: ((code_meter)::text = (cvpc.code_meter)::text)
12. 79,156.685 79,156.685 ↑ 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=41.191..41.465 rows=1 loops=1,909)

  • Index Cond: ((code_meter)::text = (pci.code_meter)::text)
Planning time : 18.243 ms
Execution time : 79,326.956 ms