Delay in coredata fetch request on substring search

We have a core data entity with an attribute "description" with very very large string stored. When we try to filter the entities with a predicate format such as "description contains ***" then it takes around 20 seconds time when the number of rows are above 10000.

To improve the speed we tried adding index to description, but it took actually more time than querying without index. Not sure it is because of "contains" predicate.

We also have a requirement of fetching all the matching rows immediately. So we cannot use fetchLimit.

Is there any alternative to fetchrequest predicate? Is there any better ways to make the fetchrequest faster? Please suggest

Thanks Vinoth

Is the description attribute index full text? https://developer.apple.com/news/?id=kbcw3mst

yes the description is full text

Delay in coredata fetch request on substring search
 
 
Q