I got a 16GB collection with 2 partitions. When I query a document by it\'s Id, it is very slow. But querying by an indexed field is fast. Both are cross-partition query and
Microsoft support responded and they've resolved the issue. They've added IndexVersion
2 for the collection. Unfortunately, it is not yet available from the portal and newly created accounts/collection are still not using the new version. You'll have to contact Microsoft Support to made changes to your accounts.
Here are the new results from a collection with index version 2 and there's a massive improvement.
SELECT * FROM c where c.id = 'uniqueValue'
-- Index Version 1: Request Charge: 344,940.79 RUs
-- Index Version 2: Request Charge: 3.31 RUs
SELECT * FROM c WHERE c.indexedField = 'value' AND c.id = 'uniqueValue'
-- Index Version 1: Request Charge: 150,666.22 RUs
-- Index Version 2: Request Charge: 5.65 RUs