I have created a CosmosDB with hierarchical keys on three levels, key1/key2/key3.
I found there is a selection problem when a certain value for the top key contain lots of instances. If the top key is included in the SQL query in a regular way using the "=" operator nothing is found, although the data is there. However, if you search for instances using the "like" operator data is found.
Example
SELECT * FROM c
where c.Key1 = 'f8d1f9dd-d881-4471-ac30-474d5273412f'
finds nothing
SELECT * FROM c
where c.Key1 like 'f8d1f9dd-d881-4471-ac30-474d5273412f%'
finds all
I see this behavior both in the Azure Portal using the SQL editor in the data explorer as in my C# code using the latest preview SDK.
The number of records with this particular value for key1 is over 7 million and having a total size of 26 GB.
We did not face these problems initially when there were not so many records.
I have created a CosmosDB with hierarchical keys on three levels, key1/key2/key3.
I found there is a selection problem when a certain value for the top key contain lots of instances. If the top key is included in the SQL query in a regular way using the "=" operator nothing is found, although the data is there. However, if you search for instances using the "like" operator data is found.
Example SELECT * FROM c where c.Key1 = 'f8d1f9dd-d881-4471-ac30-474d5273412f' finds nothing
SELECT * FROM c where c.Key1 like 'f8d1f9dd-d881-4471-ac30-474d5273412f%' finds all
I see this behavior both in the Azure Portal using the SQL editor in the data explorer as in my C# code using the latest preview SDK.
The number of records with this particular value for key1 is over 7 million and having a total size of 26 GB. We did not face these problems initially when there were not so many records.