如果我索引一个属性并且在查询中我不使用 orderBy 子句,是否会使用索引?
示例代码:
DBIndexDefinition* index = [[DBIndexDefinition alloc] init];
[index addIndexForProperty:@"prop1" propertyOrder:DBIndexSortOrderAscending | DBIndexSortOrderDescending | DBIndexSortOrderNoCase secondaryProperty:@"prop2" secondaryOrder:DBIndexSortOrderAscending | DBIndexSortOrderDescending | DBIndexSortOrderNoCase];
prop1 和 prop2 是 NSString 类型。
谢谢!