Reply
Regular Visitor
nsmono
Posts: 2
0

SOSL slow - Searching objects in salesforce for an email address

Hi,
I am trying to search all objects in Contacts, Accounts and Leads with a specific email address, rather than querying the Saleforce each time for Contacts , Leads and Accounts for the email address , I used the SOSL query

FIND {email_address} IN Email Fields RETURNING Contact(Id), Lead(Id),Account(Id)

But this query is very slow and takes a while. Is there any way I could improve the speed of this?
Do you think querying Salesforce for 3 times for Contact , Account and Lead is a faster approach, please let me know.

Thanks,
ns