explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JCVQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 10,344.093 ↑ 138.0 23 1

Unique (cost=86,613.52..86,811.83 rows=3,173 width=168) (actual time=10,344.065..10,344.093 rows=23 loops=1)

2.          

CTE similar_names

3. 20.267 20.267 ↑ 4.3 234 1

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

  • Filter: ((similar_name)::text !~~* 'Ellis'::text)
  • Rows Removed by Filter: 1
4. 0.161 10,344.069 ↑ 180.3 88 1

Sort (cost=86,600.77..86,640.43 rows=15,865 width=168) (actual time=10,344.065..10,344.069 rows=88 loops=1)

  • Sort Key: fec.name, fec.state, fec.city, fec.zip_code
  • Sort Method: quicksort Memory: 37kB
5. 5,977.873 10,343.908 ↑ 180.3 88 1

Nested Loop (cost=171.21..85,493.90 rows=15,865 width=168) (actual time=5,521.174..10,343.908 rows=88 loops=1)

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

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

7. 214.201 4,345.614 ↓ 5.9 18,834 234

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

8. 3,447.615 4,131.413 ↓ 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=699.860..4,131.413 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
9. 683.798 683.798 ↓ 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=683.798..683.798 rows=215,893 loops=1)

  • Index Cond: ((name)::text ~* '\yellis\y'::text)
Planning time : 1.909 ms
Execution time : 10,344.400 ms