You need to sign in to do that
Don't have an account?
prufrock
First Time Search Delay
Hello,
Recently I developed an S-control where I had to retrieve Lead records. The search I have done is based on "phone" column. The query is: Select Id, City, FirstName, LastName, MobilePhone, Phone, PostalCode, State, Street from Lead where IsConverted = false and phone='(111) 111-1111'
The problem we have now is that the first time we invoke the S-control, the query is really slow. However the subsequent times with any phone number, including the one from example, the query returns significantly faster.
My question is have anybody in this board experienced this problem, and if you did do you know the remedy?
Many thanks for your kind attention.
May I strongly suggest that you do this with a SOSL search instead of a SOQL search, like FIND {4155551212} IN PHONE FIELDS RETURNING Lead(Id, City, FirstName, LastName, MobilePhone, Phone, PostalCode, State, Street) ? It will be considerably faster. You won't necessarily be able to filter out the IsConverted = false in the query, but you can easily do that when the query returns, just go through the returned leads and chuck any converted ones.