explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r47v

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 465.388 ↓ 3.0 3 1

Limit (cost=13,213.89..13,348.03 rows=1 width=66) (actual time=465.296..465.388 rows=3 loops=1)

2. 0.083 465.386 ↓ 3.0 3 1

Merge Left Join (cost=13,213.89..13,348.03 rows=1 width=66) (actual time=465.294..465.386 rows=3 loops=1)

  • Merge Cond: ((cfr.firstname = ucmfrd.firstname) AND (cfr.companyname = ucmfrd.companyname))
  • Join Filter: ((cfr.lastname IS NULL) OR (lower(cfr.lastname) = lower(ucmfrd.lastname)))
  • Filter: (ucmfrd.contactid IS NULL)
  • Rows Removed by Filter: 4
3. 0.035 463.761 ↑ 2,261.9 7 1

Sort (cost=10,104.23..10,143.81 rows=15,833 width=66) (actual time=463.759..463.761 rows=7 loops=1)

  • Sort Key: cfr.firstname, cfr.companyname
  • Sort Method: quicksort Memory: 25kB
4. 443.866 463.726 ↑ 2,261.9 7 1

Bitmap Heap Scan on contactsforrecommendations cfr (cost=496.25..8,999.83 rows=15,833 width=66) (actual time=52.000..463.726 rows=7 loops=1)

  • Recheck Cond: ((lower(companyname) = 'appneta'::text) OR ((companyname % 'appneta'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'llc'::text) OR ((companyname % 'llc'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'cti group'::text) OR ((companyname % 'cti group'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'weblineindia'::text) OR ((companyname % 'weblineindia'::text) AND (length(companyname) > 4)) OR (lower(companyname) = 'tpf software'::text) OR ((companyname % 'tpf software'::text) AND (length(companyname) > 4)))
  • Rows Removed by Index Recheck: 24871
  • Filter: ((lower(companyname) = 'appneta'::text) OR ((length(companyname) > 4) AND (companyname % 'appneta'::text)) OR (lower(companyname) = 'llc'::text) OR ((length(companyname) > 4) AND (companyname % 'llc'::text)) OR (lower(companyname) = 'cti group'::text) OR ((length(companyname) > 4) AND (companyname % 'cti group'::text)) OR (lower(companyname) = 'weblineindia'::text) OR ((length(companyname) > 4) AND (companyname % 'weblineindia'::text)) OR (lower(companyname) = 'tpf software'::text) OR ((length(companyname) > 4) AND (companyname % 'tpf software'::text)))
  • Heap Blocks: exact=6997
5. 0.004 19.860 ↓ 0.0 0 1

BitmapOr (cost=496.25..496.25 rows=16,008 width=0) (actual time=19.859..19.860 rows=0 loops=1)

6. 0.024 0.024 ↑ 500.2 6 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.023..0.024 rows=6 loops=1)

  • Index Cond: (lower(companyname) = 'appneta'::text)
7. 1.485 1.485 ↑ 33.3 6 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..40.50 rows=200 width=0) (actual time=1.485..1.485 rows=6 loops=1)

  • Index Cond: (companyname % 'appneta'::text)
8. 0.016 0.016 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.016..0.016 rows=0 loops=1)

  • Index Cond: (lower(companyname) = 'llc'::text)
9. 8.495 8.495 ↓ 123.6 24,726 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..21.00 rows=200 width=0) (actual time=8.495..8.495 rows=24,726 loops=1)

  • Index Cond: (companyname % 'llc'::text)
10. 0.017 0.017 ↑ 3,001.0 1 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (lower(companyname) = 'cti group'::text)
11. 5.172 5.172 ↑ 1.1 177 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..49.50 rows=200 width=0) (actual time=5.172..5.172 rows=177 loops=1)

  • Index Cond: (companyname % 'cti group'::text)
12. 0.016 0.016 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.016..0.016 rows=0 loops=1)

  • Index Cond: (lower(companyname) = 'weblineindia'::text)
13. 2.150 2.150 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..63.00 rows=200 width=0) (actual time=2.150..2.150 rows=0 loops=1)

  • Index Cond: (companyname % 'weblineindia'::text)
14. 0.013 0.013 ↓ 0.0 0 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_lower (cost=0.00..43.93 rows=3,001 width=0) (actual time=0.013..0.013 rows=0 loops=1)

  • Index Cond: (lower(companyname) = 'tpf software'::text)
15. 2.468 2.468 ↑ 200.0 1 1

Bitmap Index Scan on idx_contactsforrecommendations_companyname_gin (cost=0.00..63.00 rows=200 width=0) (actual time=2.467..2.468 rows=1 loops=1)

  • Index Cond: (companyname % 'tpf software'::text)
16. 0.794 1.542 ↑ 5.8 354 1

Sort (cost=3,109.66..3,114.77 rows=2,043 width=38) (actual time=1.519..1.542 rows=354 loops=1)

  • Sort Key: ucmfrd.firstname, ucmfrd.companyname
  • Sort Method: quicksort Memory: 66kB
17. 0.649 0.748 ↑ 4.2 491 1

Bitmap Heap Scan on usermycontactsforrecommdedupe ucmfrd (cost=25.26..2,997.33 rows=2,043 width=38) (actual time=0.140..0.748 rows=491 loops=1)

  • Recheck Cond: ((userid = '13670'::bigint) AND (firstname IS NOT NULL) AND (companyname IS NOT NULL))
  • Heap Blocks: exact=382
18. 0.099 0.099 ↑ 4.2 491 1

Bitmap Index Scan on idx_usermycontactsforrecommdedupe_userid_names (cost=0.00..24.75 rows=2,042 width=0) (actual time=0.099..0.099 rows=491 loops=1)

  • Index Cond: (userid = '13670'::bigint)
Planning time : 1.291 ms
Execution time : 465.678 ms