explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7Dg

Settings
# exclusive inclusive rows x rows loops node
1. 0.025 13,046.139 ↑ 138.0 23 1

Unique (cost=87,050.31..87,248.62 rows=3,173 width=168) (actual time=13,046.110..13,046.139 rows=23 loops=1)

2.          

CTE similar_names

3. 18.259 18.259 ↑ 4.3 234 1

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

  • Filter: ((similar_name)::text !~~* 'Ellis'::text)
  • Rows Removed by Filter: 1
4. 0.194 13,046.114 ↑ 180.3 88 1

Sort (cost=87,037.56..87,077.22 rows=15,865 width=168) (actual time=13,046.109..13,046.114 rows=88 loops=1)

  • Sort Key: fec.name, fec.state, fec.city, fec.zip_code
  • Sort Method: quicksort Memory: 37kB
5. 6,422.570 13,045.920 ↑ 180.3 88 1

Nested Loop (cost=602.45..85,930.69 rows=15,865 width=168) (actual time=7,912.623..13,045.920 rows=88 loops=1)

  • Join Filter: ((fec.name)::text ~* (('\y'::text || (sn1.similar_name)::text) || '\y'::text))
  • Rows Removed by Join Filter: 4407068
6. 18.466 18.466 ↑ 4.3 234 1

CTE Scan on similar_names sn1 (cost=0.00..20.00 rows=1,000 width=32) (actual time=17.514..18.466 rows=234 loops=1)

7. 235.680 6,604.884 ↓ 5.9 18,834 234

Materialize (cost=602.45..22,458.62 rows=3,173 width=36) (actual time=4.384..28.226 rows=18,834 loops=234)

8. 5,361.997 6,369.204 ↓ 5.9 18,834 1

Bitmap Heap Scan on contributions_fec_contributions fec (cost=602.45..22,442.76 rows=3,173 width=36) (actual time=1,025.703..6,369.204 rows=18,834 loops=1)

  • Recheck Cond: ((name)::text ~* '\yEllis\y'::text)
  • Rows Removed by Index Recheck: 2515012
  • Filter: ((state IS NULL) OR (lower((state)::text) = 'ca'::text))
  • Rows Removed by Filter: 124518
  • Heap Blocks: exact=66986 lossy=96038
9. 1,007.207 1,007.207 ↓ 11.9 233,891 1

Bitmap Index Scan on ix_contributions_fec_contributions_name_idx (cost=0.00..601.65 rows=19,647 width=0) (actual time=1,007.207..1,007.207 rows=233,891 loops=1)

  • Index Cond: ((name)::text ~* '\yEllis\y'::text)