Question
· Aug 13

Inconsistency in Caché Database: Mismatch Between Total Count Based on Unique Identifiers, Deduplicated Count, and Conditional Query Results

In the Caché database, when calculating the total count based on the unique identifier of a record, the quantity is over 1.2 million. After removing duplicates based on the unique identifier and then calculating the total count, the quantity is over 400,000. When grouping by the unique identifier, it can be observed that the count for this identifier is not one. However, when performing a conditional query based on the identifier, only one record can be retrieved. Why is this the case?

Product version: Caché 2016.1
Discussion (4)3
Log in or sign up to continue

In SMP (System Management Portal), you step to EXLORER and then step into SQL
where you select your TABLE. and can rebuild index


Furthermore, every persistent class  has by default
• classmethod %BuildDeferredIndices
• classmethod %BuildIndices
• classmethod %BuildIndicesAsync

Next variant : use $SYSTEM.OBJ.ValidateIndices()
Details described here  Fix broken index 8 years ago, still valid