Hi geraldss,
Thanks for the reply.
I’ve tried cbft but its not production ready so I’m unable to use it.
I’ve tried to use the LIKE ‘xxx%’ solution and I found something quite disturbing.
When doing this query from workbench, It take about **100 **msec:
SELECT usr.fullName AS FullName,
usr.dateOfBirth AS DateOfBirth,
usr.userId AS UserId,
usr.roles AS Roles
FROM default usr
WHERE usr.documentType = ‘User’ AND usr.fullName LIKE ‘james%’
Running the following query from .net client takes 20 seconds:
var queryRequest = new QueryRequest(
@“SELECT usr.fullName,
usr.dateOfBirth,
usr.userId,
usr.roles
FROM default usr
WHERE usr.documentType = $documentType AND
usr.fullName LIKE $textToSearch”)
.AddNamedParameter(“documentType”, DocumentType.User)
.AddNamedParameter(“textToSearch”, “james%”);
when I removed the NamedParams and use string.Format(), It takes **3 **seconds…
Can you tell me why is this huge difference happen ?
Thanks