You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a completely unnecessary query if only Fields.Contact fields are included. It leads to unnecessary parsing of potentially large number of data rows.
Only the Contacts and RawContacts table need to be queried. The Data table can be skipped in such cases.
Add a note that not including any data fields will result in all returned Contact and RawContact entities to be blank (isBlank will return true) even if they are actually not blank in the database.
Update gh-pages branch
The text was updated successfully, but these errors were encountered:
The documentation I put up for optimizing queries by using
include
is currently not implemented (I thought I already did though!!!).Problem
When using the
Query
orBroadQuery
APIs, the data table is still queried even if no data field is included.contacts-android/core/src/main/java/contacts/core/Query.kt
Lines 666 to 674 in 142eced
This is a completely unnecessary query if only
Fields.Contact
fields are included. It leads to unnecessary parsing of potentially large number of data rows.Only the Contacts and RawContacts table need to be queried. The Data table can be skipped in such cases.
Solution
Skip the data query if no data field is included.
isBlank
will return true) even if they are actually not blank in the database.gh-pages
branchThe text was updated successfully, but these errors were encountered: