Resources | Resources |



Performance considerations

There is no artificial limit on the number of contacts that can be stored in the database. Below are some of the performance issues that IContacts clients might want to consider.

  • Transactions: Clients that perform multiple write operations, such as adding multiple records through AddRecord, should wrap those operations within a transaction if possible. This is generally more efficient as it can reduce the number of writes to the underlying datastore.
  • Delayed record population: The current implementation of IContacts does not populate all fields of a record after calls to pim_IContacts_GetRecord or pim_IContactsResults_GetNext. Only the RecordId field is populated after these calls. Subsequent calls to GetFieldValue will actually pull data from the datastore and cache them inside the record object.
  • Search count: It is recommended that clients do not call SearchCount unless they really need to know the number of items that will be returned in the ResultSet. The reasoning is that SearchCount performs the same query on the datastore as Search does. If a client calls both SearchCount (to get the count) and Search (to retrieve the results) it is effectively performing the same search twice.