Hi, i develop Xamarin app to UWP, IOS and Android
I’m converting from a SQLite local db to Realm. I have from 200K to 1500K rows. Db is read-only.
My doubt is String Operators are optimized to use Index and not make a total scan ?
Example:
public class Words(){
[PrimaryKey]
public Guid _id { get; set; }
[Indexed]
public string Word { get; set;}
}
imaging i need to locate rows that contains young, and i need to recover rows that contains young, Loretta Young, Ralph Young Junior, old-young and Young and guaranteed the order : young, Young, old-young, Loretta Young, Ralph Young Junior.
I imagine to made two queries and make results union .
var w = Realm().Where(t => t.word.StartsWith(“young”,
ignoreCase, CultureInfo.CurrentCulture));
union to
var w1 = Realm().Where(t => t.word.Like(“* young*”,
ignoreCase, CultureInfo.CurrentCulture) && t.word.Like(“-young”,
ignoreCase, CultureInfo.CurrentCulture));
I can’t find Where in class documentation Namespace Realms | Realm
Indexed made any difference in query or i need create properties like word.Lowcase , a property to restrict rows to execute like ?
Thanks for any help.