explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E5uS

Settings
# exclusive inclusive rows x rows loops node
1. 3.276 12,657.200 ↓ 3.0 2,501 1

Hash Left Join (cost=1,940.71..13,392.32 rows=833 width=32) (actual time=44.422..12,657.200 rows=2,501 loops=1)

  • Join Filter: (tariffa.on_partenza = 1)
  • Hash Cond: ((tariffa.id = partenza.idtariffa) AND (date_part('dow'::text, ((giorni.g)::date)::timestamp without time zone) = (partenza.giorno)::double precision))
2. 2.663 12,653.924 ↓ 3.0 2,501 1

Nested Loop (cost=1,935.41..13,349.51 rows=833 width=50) (actual time=44.370..12,653.924 rows=2,501 loops=1)

3. 4.847 12,651.261 ↓ 9.0 2,501 1

Hash Left Join (cost=1,935.13..13,334.76 rows=278 width=54) (actual time=44.359..12,651.261 rows=2,501 loops=1)

  • Join Filter: (tariffa.on_arrivo = 1)
  • Hash Cond: ((tariffa.id = arrivo.idtariffa) AND (date_part('dow'::text, ((giorni.g)::date)::timestamp without time zone) = (arrivo.giorno)::double precision))
4. 1,541.618 12,646.414 ↓ 9.0 2,501 1

Nested Loop Left Join (cost=1,929.83..13,325.97 rows=278 width=52) (actual time=44.297..12,646.414 rows=2,501 loops=1)

  • Rows Removed by Join Filter: 924739
  • Join Filter: ((tariffa.id = vincoli.idtariffa) AND (vincoli.periodo @> (giorni.g)::date))
5. 1,336.818 11,104.796 ↓ 9.0 2,501 1

Nested Loop Left Join (cost=1,929.42..11,693.32 rows=278 width=42) (actual time=43.852..11,104.796 rows=2,501 loops=1)

  • Rows Removed by Join Filter: 75727
  • Join Filter: ((tariffa.id = dispo.idtariffa) AND (dispo.periodo @> (giorni.g)::date))
6. 20.318 9,767.978 ↓ 9.0 2,501 1

Nested Loop (cost=1,929.02..10,807.78 rows=278 width=38) (actual time=42.881..9,767.978 rows=2,501 loops=1)

  • Rows Removed by Join Filter: 18824
  • Join Filter: (prezzi.periodo @> (giorni.g)::date)
7. 9,747.653 9,747.653 ↓ 76.7 21,325 1

Materialize (cost=1,929.01..5,933.46 rows=278 width=44) (actual time=40.424..9,747.653 rows=21,325 loops=1)

8. 0.000 0.007 ↑ 1,000.0 1 1

Function Scan on generate_series giorni (cost=0.01..10.01 rows=1,000 width=8) (actual time=0.006..0.007 rows=1 loops=1)

9. 9,733.424 9,733.424 ↓ 76.7 21,325 1

Hash Join (cost=1,929.01..5,932.07 rows=278 width=44) (actual time=40.421..9,733.424 rows=21,325 loops=1)

  • Hash Cond: (((prezzi.interno)::text = (interni.nome)::text) AND (prezzi.idappartamento = interni.idappartamento))