I'm looking to speed up queries to my SQL backed CoreData instance (displaying records sorted by date). I know that indexing can help decrease query time, but what's the difference between:
Highlighting the entity that an attribute belongs to, then adding a comma separated list of attributes into the indexes field as seen here:
Or highlighting the attribute, then checking the indexed box as seen here:


Adding a row with a single attribute to the
Indexeslist is equivalent to selectingIndexedfor that attribute: It creates an index for the attribute to speed up searches in query statements.The
Indexeslist is meant for compound indexes. Compound indexes are useful when you know that you will be searching for values of these attributes combined in theWHEREclause of a query:This statement could make use of a compound index
surname, firstname. That index would also be useful if you just search forsurname, but not if you only search forfirstname. Think of the index as if it were a phone book: It is sorted by surname first, then by first name. So the order of attributes is important.In your case you should go for the single indexes first (that is, select
Indexedfor the attributes you like to search for). The compound index you showed could never be used if you just search forbabyId, for example.