explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yOmI : Optimization for: plan #XNKc

Settings

Optimization path:

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

Nested Loop (cost=188.54..44,957.43 rows=1 width=168) (actual rows= loops=)

  • Join Filter: ((c.department_id)::text = (d.id)::text)
2. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=188.54..44,954.53 rows=20 width=171) (actual rows= loops=)

  • Hash Cond: (pr.program_id = p.id)
3. 0.000 0.000 ↓ 0.0

Seq Scan on program_document pr (cost=0.00..41,151.22 rows=956,522 width=72) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash (cost=188.53..188.53 rows=1 width=107) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..188.53 rows=1 width=107) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.55..166.58 rows=5 width=84) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..164.16 rows=5 width=35) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Seq Scan on record_realty rr (cost=0.00..30.75 rows=17 width=8) (actual rows= loops=)

  • Filter: ((realty_id IS NULL) OR (record_id = '-41'::integer))
9. 0.000 0.000 ↓ 0.0

Index Scan using realty_pkey on realty r (cost=0.28..7.85 rows=1 width=43) (actual rows= loops=)

  • Index Cond: (id = rr.realty_id)
  • Filter: (((availability)::text <> 'OPTION'::text) AND ((availability)::text <> 'SOLD'::text) AND (including_taxes_price <= '312668'::double precision) AND (((type)::text = 'HOUSE'::text) OR ((type)::text = 'APARTMENT'::text) OR ((type)::text = 'DUPLEX'::text) OR ((type)::text = 'TRIPLEX'::text)))
10. 0.000 0.000 ↓ 0.0

Index Scan using program_pkey on program p (cost=0.27..0.49 rows=1 width=57) (actual rows= loops=)

  • Index Cond: (id = r.program_id)
  • Filter: (is_eligible_pinel IS TRUE)
11. 0.000 0.000 ↓ 0.0

Index Scan using city_pkey on city c (cost=0.29..4.36 rows=1 width=31) (actual rows= loops=)

  • Index Cond: (id = p.city_id)
  • Filter: ((zip_code)::text = ANY ('{92360,93000,93140,93190,93420,93410,93320,93150,93700}'::text[]))
12. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.31 rows=2 width=3) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on department d (cost=0.00..2.30 rows=2 width=3) (actual rows= loops=)

  • Filter: ((id)::text = ANY ('{92,93}'::text[]))