explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XaSl

Settings
# exclusive inclusive rows x rows loops node
1. 557.642 879.251 ↑ 5,795.7 7 1

Nested Loop (cost=1,626.05..687,374.20 rows=40,570 width=93) (actual time=449.221..879.251 rows=7 loops=1)

  • Join Filter: ((cc.original_name)::text ~* (('\y'::text || (sn1.similar_name)::text) || '\y'::text))
  • Rows Removed by Join Filter: 356843
2.          

CTE similar_names

3. 21.742 21.742 ↑ 4.3 234 1

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

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

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

5. 19.318 299.754 ↑ 5.3 1,525 234

Materialize (cost=1,613.30..525,081.74 rows=8,114 width=57) (actual time=0.026..1.281 rows=1,525 loops=234)

6. 23.354 280.436 ↑ 5.3 1,525 1

Nested Loop Left Join (cost=1,613.30..525,041.17 rows=8,114 width=57) (actual time=5.974..280.436 rows=1,525 loops=1)

  • Filter: ((ca.state IS NULL) OR (lower((ca.state)::text) ~* 'CA'::text))
  • Rows Removed by Filter: 12780
7. 168.408 171.252 ↑ 13.7 14,305 1

Bitmap Heap Scan on contributions_contributors cc (cost=1,612.86..216,358.98 rows=195,337 width=42) (actual time=4.832..171.252 rows=14,305 loops=1)

  • Recheck Cond: (to_tsvector('simple'::regconfig, (original_name)::text) @@ '''ellis'''::tsquery)
  • Heap Blocks: exact=12911
8. 2.844 2.844 ↑ 13.7 14,305 1

Bitmap Index Scan on ix_contributions_contributors_original_name_tsv_simple (cost=0.00..1,564.03 rows=195,337 width=0) (actual time=2.844..2.844 rows=14,305 loops=1)

  • Index Cond: (to_tsvector('simple'::regconfig, (original_name)::text) @@ '''ellis'''::tsquery)
9. 85.830 85.830 ↑ 1.0 1 14,305

Index Scan using contributions_addresses_pkey on contributions_addresses ca (cost=0.44..1.57 rows=1 width=23) (actual time=0.006..0.006 rows=1 loops=14,305)

  • Index Cond: (cc.address_id = id)
Planning time : 1.375 ms
Execution time : 879.479 ms