explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nMza

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 4.495 220.782 ↓ 1,909.0 1,909 1

HashAggregate (cost=187.66..187.94 rows=1 width=39) (actual time=220.098..220.782 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), (trunc(ped.contracted_power, 0))::bigint
2. 126.367 216.287 ↓ 1,909.0 1,909 1

Nested Loop (cost=50.76..187.64 rows=1 width=39) (actual time=0.754..216.287 rows=1,909 loops=1)

3. 2.544 68.921 ↓ 1,909.0 1,909 1

Nested Loop (cost=50.33..178.90 rows=1 width=41) (actual time=0.515..68.921 rows=1,909 loops=1)

  • Join Filter: ((cvpc.code_meter)::text = (cm.code_meter)::text)
4. 1.748 14.834 ↓ 1,909.0 1,909 1

Nested Loop (cost=49.91..178.45 rows=1 width=69) (actual time=0.468..14.834 rows=1,909 loops=1)

5. 0.302 0.642 ↓ 12.8 102 1

Bitmap Heap Scan on v_m_pci_principal_carga cvpc (cost=40.51..71.08 rows=8 width=43) (actual time=0.349..0.642 rows=102 loops=1)

  • Recheck Cond: ((grupo = 101655) AND (territorio = 'ERZ'::text))
  • Heap Blocks: exact=37
6. 0.006 0.340 ↓ 0.0 0 1

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

7. 0.030 0.030 ↑ 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.030..0.030 rows=102 loops=1)

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

  • Index Cond: (territorio = 'ERZ'::text)
9. 1.530 12.444 ↓ 19.0 19 102

Bitmap Heap Scan on pln_cmc_integrator pci (cost=9.40..13.41 rows=1 width=42) (actual time=0.111..0.122 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
10. 0.160 10.914 ↓ 0.0 0 102

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

11. 6.834 6.834 ↓ 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.067..0.067 rows=19 loops=102)

  • Index Cond: (id_cmc_meter = cvpc.id_cmc_meter)
12. 3.920 3.920 ↓ 1.8 20 98

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

  • Index Cond: ((code_meter)::text = (cvpc.code_meter)::text)
13. 51.543 51.543 ↑ 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.027..0.027 rows=1 loops=1,909)

  • Index Cond: ((code_meter)::text = (pci.code_meter)::text)
14. 20.999 20.999 ↑ 1.0 1 1,909

Index Scan using pk_extractor_detail on pln_extractor_detail ped (cost=0.43..8.45 rows=1 width=14) (actual time=0.010..0.011 rows=1 loops=1,909)

  • Index Cond: (id_extractor_detail = cvpc.id_extractor_detail)
Planning time : 10.899 ms
Execution time : 222.084 ms