explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9u45

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=753,988,601.65..773,784,923.63 rows=406,925,428 width=322) (actual rows= loops=)

  • Merge Cond: ((pk.encoded_monto = over.encoded_monto) AND ((pk.usuario)::text = (over.usuario)::text))
  • Join Filter: (upper(btrim((pk.concepto)::text)) = upper(btrim((over.concepto)::text)))
2. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=753,887,907.25..771,586,794.37 rows=406,925,428 width=235) (actual rows= loops=)

  • Merge Cond: ((pk.encoded_monto = cat.encoded_monto) AND ((pk.usuario)::text = (cat.usuario)::text) AND ((pk.concepto)::text = (cat.concepto)::text) AND (pk.fecha = cat.fecha))
  • Join Filter: pk.enabled
3. 0.000 0.000 ↓ 0.0

Sort (cost=230,110,938.42..231,128,251.99 rows=406,925,428 width=192) (actual rows= loops=)

  • Sort Key: pk.encoded_monto, pk.usuario, pk.concepto, pk.fecha
4. 0.000 0.000 ↓ 0.0

Seq Scan on gasto_cat_v7 pk (cost=0.00..21,707,497.28 rows=406,925,428 width=192) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Materialize (cost=523,776,968.82..527,981,035.06 rows=840,813,248 width=176) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=523,776,968.82..525,879,001.94 rows=840,813,248 width=176) (actual rows= loops=)

  • Sort Key: cat.encoded_monto, cat.usuario, cat.concepto, cat.fecha
7. 0.000 0.000 ↓ 0.0

Seq Scan on gasto_alt_cat_v5 cat (cost=0.00..39,903,943.48 rows=840,813,248 width=176) (actual rows= loops=)

  • Filter: enabled
8. 0.000 0.000 ↓ 0.0

Materialize (cost=100,693.61..102,236.45 rows=308,567 width=187) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Sort (cost=100,693.61..101,465.03 rows=308,567 width=187) (actual rows= loops=)

  • Sort Key: over.encoded_monto, over.usuario
10. 0.000 0.000 ↓ 0.0

Seq Scan on gasto_override_cat_v5 over (cost=0.00..15,600.67 rows=308,567 width=187) (actual rows= loops=)