000022291 - How to optimize performance of querying ISparseData sets to retrieve an attribute of each member in RSA ClearTrust

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000022291
Applies ToRSA ClearTrust 5.0.1 Administrative Java API
Oracle 8.1.7
Querying large numbers of records
IssueHow to optimize performance of querying ISparseData sets to retrieve an attribute of each member in RSA ClearTrust
Poor performance
Excessive database record retrievals
CauseThe standard prescribed approach for retrieving a set of an object attribute, such as "the name of each group belonging to this admin group", is to retrieve an ISparseData of all groups, and loop through the range of groups, getting the name of each group member. In practice, this is very inefficient, as for each member of the range of groups, a database query of the entire sparse data is performed. Therefore, if such a query returns an ISparseData comprised of 30 group members, the iteration through that list of 30 groups to retrieve each group's name will mean the entire ISparseData needs to be retrieved again 30 times, totaling 930 groups retrieved from the database.
ResolutionAfter retrieving the initial ISparseData data set, cast the data set into a local array of groups, and retrieve the names of the groups from the local array. In the example above, this will reduce the total number of groups retrieved from the database to 30.
Legacy Article IDa18792

Attachments

    Outcomes