explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kg1v

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

Nested Loop Left Join (cost=13.19..4,246,903.75 rows=3,635 width=93) (actual rows= loops=)

  • Join Filter: (cc.last_name ~ (('\y'::text || (sn2.similar_name)::text) || '\y'::text))
  • Filter: (((sn1.similar_name IS NOT NULL) AND (cc.last_name ~ '\yEllis\y'::text)) OR ((sn2.similar_name IS NOT NULL) AND (cc.first_name ~ '\yEllis\y'::text)))
2.          

CTE sname

3. 0.000 0.000 ↓ 0.0

Function Scan on get_similar_names (cost=0.25..12.75 rows=1,000 width=36) (actual rows= loops=)

  • Filter: ((similar_name)::text !~~* 'Ellis'::text)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.44..1,866,093.50 rows=73,255 width=89) (actual rows= loops=)

  • Join Filter: (cc.first_name ~ (('\y'::text || (sn1.similar_name)::text) || '\y'::text))
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.44..1,463,181.00 rows=14,651 width=57) (actual rows= loops=)

  • Filter: ((ca.state IS NULL) OR (lower((ca.state)::text) = 'ca'::text))
6. 0.000 0.000 ↓ 0.0

Seq Scan on contributions_contributors cc (cost=0.00..987,036.34 rows=387,038 width=42) (actual rows= loops=)

  • Filter: ((last_name ~ '\yEllis\y'::text) OR (first_name ~ '\yEllis\y'::text))
7. 0.000 0.000 ↓ 0.0

Index Scan using contributions_addresses_pkey on contributions_addresses ca (cost=0.44..1.22 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (cc.address_id = id)
8. 0.000 0.000 ↓ 0.0

CTE Scan on sname sn1 (cost=0.00..20.00 rows=1,000 width=32) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

CTE Scan on sname sn2 (cost=0.00..20.00 rows=1,000 width=32) (actual rows= loops=)