explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yRAF

Settings
# exclusive inclusive rows x rows loops node
1. 1,115.064 5,332.735 ↑ 240.4 22 1

Nested Loop (cost=183.96..102,693.65 rows=5,288 width=168) (actual time=4,306.893..5,332.735 rows=22 loops=1)

  • Join Filter: ((""position""((fec.name)::text, (sn1.name)::text) > 0) AND ((fec.name)::text ~* (('\y'::text || (sn1.name)::text) || '\y'::text)))
  • Rows Removed by Join Filter: 4407134
2.          

CTE similar_names_cte

3. 21.719 21.719 ↑ 4.3 234 1

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

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

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

5. 191.974 4,195.854 ↓ 5.9 18,834 234

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

6. 3,341.761 4,003.880 ↓ 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=678.550..4,003.880 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. 662.119 662.119 ↓ 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=662.119..662.119 rows=215,893 loops=1)

  • Index Cond: ((name)::text ~* '\yEllis\y'::text)
Planning time : 1.813 ms
Execution time : 5,333.033 ms