explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 8.038 60,187.605 ↓ 1,909.0 1,909 1

HashAggregate (cost=1,746.92..1,747.20 rows=1 width=33) (actual time=60,187.013..60,187.605 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. 130.131 60,179.567 ↓ 1,909.0 1,909 1

Nested Loop (cost=20.17..1,746.90 rows=1 width=33) (actual time=43.398..60,179.567 rows=1,909 loops=1)

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

Nested Loop (cost=19.75..78.70 rows=1 width=61) (actual time=0.365..11.386 rows=1,909 loops=1)

4. 0.217 0.288 ↓ 25.0 100 1

Bitmap Heap Scan on v_m_pci_principal_carga cvpc (cost=10.33..24.92 rows=4 width=35) (actual time=0.080..0.288 rows=100 loops=1)

  • Recheck Cond: ((grupo = 101655) AND (territorio = 'ERZ'::text))
  • Heap Blocks: exact=39
5. 0.006 0.071 ↓ 0.0 0 1

BitmapAnd (cost=10.33..10.33 rows=4 width=0) (actual time=0.071..0.071 rows=0 loops=1)

6. 0.027 0.027 ↑ 1.0 100 1

Bitmap Index Scan on in_v_m_pci_principal_carga_grupo (cost=0.00..5.03 rows=100 width=0) (actual time=0.027..0.027 rows=100 loops=1)

  • Index Cond: (grupo = 101655)
7. 0.038 0.038 ↑ 1.0 102 1

Bitmap Index Scan on in_v_m_pci_principal_carga_territorio (cost=0.00..5.04 rows=102 width=0) (actual time=0.038..0.038 rows=102 loops=1)

  • Index Cond: (territorio = 'ERZ'::text)
8. 2.400 8.400 ↓ 19.0 19 100

Bitmap Heap Scan on pln_cmc_integrator pci (cost=9.42..13.43 rows=1 width=42) (actual time=0.064..0.084 rows=19 loops=100)

  • Recheck Cond: ((id_cmc_meter = cvpc.id_cmc_meter) AND ((code_meter)::text = (cvpc.code_meter)::text))
  • Heap Blocks: exact=261
9. 0.382 6.000 ↓ 0.0 0 100

BitmapAnd (cost=9.42..9.42 rows=1 width=0) (actual time=0.060..0.060 rows=0 loops=100)

10. 1.600 1.600 ↓ 1.9 19 100

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

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

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

  • Index Cond: ((code_meter)::text = (cvpc.code_meter)::text)
12. 60,038.050 60,038.050 ↑ 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=31.205..31.450 rows=1 loops=1,909)

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