explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KKfn

Settings
# exclusive inclusive rows x rows loops node
1. 32,952.893 33,518.161 ↓ 2.5 1,822 1

Nested Loop Left Join (cost=123.73..19,496.04 rows=740 width=93) (actual time=158.235..33,518.161 rows=1,822 loops=1)

  • Join Filter: ((((cc.last_name)::text || ' '::text) || (cc.first_name)::text) ~ (('\y'::text || (sn1.similar_name)::text) || '\y'::text))
  • Rows Removed by Join Filter: 426343
2.          

CTE sname

3. 14.493 14.493 ↑ 4.3 234 1

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

  • Filter: ((similar_name)::text !~~* 'Ellis'::text)
  • Rows Removed by Filter: 1
4. 14.206 477.812 ↓ 12.3 1,822 1

Nested Loop Left Join (cost=110.98..14,663.29 rows=148 width=57) (actual time=125.941..477.812 rows=1,822 loops=1)

  • Filter: ((ca.state IS NULL) OR (lower((ca.state)::text) = 'ca'::text))
  • Rows Removed by Filter: 7339
5. 280.448 399.479 ↓ 2.3 9,161 1

Bitmap Heap Scan on contributions_contributors cc (cost=110.54..4,413.25 rows=3,902 width=42) (actual time=125.456..399.479 rows=9,161 loops=1)

  • Recheck Cond: ((((last_name)::text || ' '::text) || (first_name)::text) ~ '\yEllis\y'::text)
  • Rows Removed by Index Recheck: 24860
  • Heap Blocks: exact=31138
6. 119.031 119.031 ↓ 8.7 34,021 1

Bitmap Index Scan on ix_contributions_contributors_name_gin (cost=0.00..109.56 rows=3,902 width=0) (actual time=119.031..119.031 rows=34,021 loops=1)

  • Index Cond: ((((last_name)::text || ' '::text) || (first_name)::text) ~ '\yEllis\y'::text)
7. 64.127 64.127 ↑ 1.0 1 9,161

Index Scan using contributions_addresses_pkey on contributions_addresses ca (cost=0.44..2.61 rows=1 width=23) (actual time=0.007..0.007 rows=1 loops=9,161)

  • Index Cond: (cc.address_id = id)
8. 87.456 87.456 ↑ 4.3 234 1,822

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

Planning time : 1.112 ms
Execution time : 33,519.281 ms