explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Fbt

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 7.208 46,716.008 ↓ 1,909.0 1,909 1

HashAggregate (cost=1,746.92..1,747.20 rows=1 width=33) (actual time=46,715.547..46,716.008 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. 122.449 46,708.800 ↓ 1,909.0 1,909 1

Nested Loop (cost=20.17..1,746.90 rows=1 width=33) (actual time=37.786..46,708.800 rows=1,909 loops=1)

3. 2.528 10.569 ↓ 1,909.0 1,909 1

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

4. 0.221 0.341 ↓ 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.133..0.341 rows=100 loops=1)

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

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

6. 0.043 0.043 ↑ 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.043..0.043 rows=100 loops=1)

  • Index Cond: (grupo = 101655)
7. 0.065 0.065 ↑ 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.065..0.065 rows=102 loops=1)

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

Bitmap Heap Scan on pln_cmc_integrator pci (cost=9.42..13.43 rows=1 width=42) (actual time=0.059..0.077 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.372 5.500 ↓ 0.0 0 100

BitmapAnd (cost=9.42..9.42 rows=1 width=0) (actual time=0.055..0.055 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. 3.528 3.528 ↓ 1.5 20 98

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

  • Index Cond: ((code_meter)::text = (cvpc.code_meter)::text)
12. 46,575.782 46,575.782 ↑ 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=24.208..24.398 rows=1 loops=1,909)

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