explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 54X6

Settings
# exclusive inclusive rows x rows loops node
1. 28,429.949 32,711.767 ↓ 3.6 56,597 1

Nested Loop (cost=183.96..1,672,006.65 rows=15,865 width=168) (actual time=8,196.263..32,711.767 rows=56,597 loops=1)

  • Join Filter: (to_tsvector('english'::regconfig, (fec.name)::text) @@ to_tsquery('english'::regconfig, regexp_replace(replace((sn1.name)::text, '&'::text, ''::text), '\s+'::text, ' & '::text, 'g'::text)))
  • Rows Removed by Join Filter: 4350559
2.          

CTE similar_names_cte

3. 18.817 18.817 ↑ 4.3 234 1

Function Scan on get_similar_names (cost=0.25..12.75 rows=1,000 width=32) (actual time=18.435..18.817 rows=234 loops=1)

  • Filter: ((similar_name)::text !~~* 'Ellis'::text)
  • Rows Removed by Filter: 1
4. 19.040 19.040 ↑ 4.3 234 1

CTE Scan on similar_names_cte sn1 (cost=0.00..20.00 rows=1,000 width=32) (actual time=18.437..19.040 rows=234 loops=1)

5. 288.419 4,262.778 ↓ 5.9 18,834 234

Materialize (cost=171.21..22,021.83 rows=3,173 width=36) (actual time=2.904..18.217 rows=18,834 loops=234)

6. 3,311.157 3,974.359 ↓ 5.9 18,834 1

Bitmap Heap Scan on contributions_fec_contributions fec (cost=171.21..22,005.97 rows=3,173 width=36) (actual time=679.410..3,974.359 rows=18,834 loops=1)

  • Recheck Cond: ((name)::text ~* '\yEllis\y'::text)
  • Rows Removed by Index Recheck: 2521338
  • Filter: ((state IS NULL) OR (lower((state)::text) = 'ca'::text))
  • Rows Removed by Filter: 124518
  • Heap Blocks: exact=65375 lossy=96230
7. 663.202 663.202 ↓ 11.0 215,893 1

Bitmap Index Scan on ix_contributions_fec_contributions_name_idx_t (cost=0.00..170.41 rows=19,642 width=0) (actual time=663.202..663.202 rows=215,893 loops=1)

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