explain.depesz.com

PostgreSQL's explain analyze made readable

Result: glb8

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 1,546.351 ↓ 2.9 200 1

Limit (cost=106,670.09..107,390.95 rows=70 width=8) (actual time=1,541.451..1,546.351 rows=200 loops=1)

2. 0.025 1,546.334 ↓ 2.9 200 1

Nested Loop (cost=106,670.09..107,390.95 rows=70 width=8) (actual time=1,541.451..1,546.334 rows=200 loops=1)

3. 62.514 1,541.525 ↓ 4.3 368 1

HashAggregate (cost=106,669.67..106,670.53 rows=86 width=12) (actual time=1,541.391..1,541.525 rows=368 loops=1)

4. 683.058 1,479.011 ↓ 1,683.1 144,748 1

Hash Join (cost=48,842.06..106,669.24 rows=86 width=12) (actual time=594.529..1,479.011 rows=144,748 loops=1)

  • Hash Cond: ((h.id_habitante = h1.id_habitante) AND ((max(h.fecha_real)) = h1.fecha_real))
5. 77.014 202.722 ↓ 1.5 142,775 1

GroupAggregate (cost=0.42..23,475.93 rows=97,945 width=12) (actual time=0.095..202.722 rows=142,775 loops=1)

6. 125.708 125.708 ↑ 1.0 474,572 1

Index Only Scan using phistorico_norden6 on phistorico h (cost=0.42..20,123.49 rows=474,597 width=12) (actual time=0.089..125.708 rows=474,572 loops=1)

  • Index Cond: ((cd_prov_ent = '46'::text) AND (cd_mun_ent = '131'::text) AND (fecha_real <= '2018-12-31 00:00:00'::timestamp without time zone))
  • Heap Fetches: 0
7. 114.476 593.231 ↑ 1.0 475,288 1

Hash (cost=38,927.32..38,927.32 rows=475,288 width=20) (actual time=593.231..593.231 rows=475,288 loops=1)

  • Buckets: 2048 Batches: 32 Memory Usage: 831kB
8. 478.755 478.755 ↑ 1.0 475,288 1

Seq Scan on phistorico h1 (cost=0.00..38,927.32 rows=475,288 width=20) (actual time=0.019..478.755 rows=475,288 loops=1)

  • Filter: (((cd_prov_ent)::text = '46'::text) AND ((cd_mun_ent)::text = '131'::text))
9. 4.784 4.784 ↑ 1.0 1 368

Index Scan using phistorico_norden1 on phistorico h3 (cost=0.42..8.36 rows=1 width=8) (actual time=0.013..0.013 rows=1 loops=368)

  • Index Cond: (id_registro = (max(h1.id_registro)))
  • Filter: ((tipo_mov <> 'B'::bpchar) AND ((cd_prov_ent)::text = '46'::text) AND ((cd_mun_ent)::text = '131'::text))
  • Rows Removed by Filter: 0