The SQL query text exceeded the maximum limit of 30720 characters in Azure CosmosDB

只谈情不闲聊 提交于 2019-12-24 01:20:06

问题


I have a query where I use an array with an "IN" style setup.

var builder = Builders<Transaction>.Filter;
        var filter = builder.Eq("App", app) 
                      & builder.In("TransactionId", incomingIds);
        List<string> existingTransactions = collection
            .Find(filter)
            .Project(x => x.TransactionId)
            .ToList();

A while back this started to throw the error below and I had reduce my batch-size significantly to avoid the error.

Command delete failed: Errors encountered exception while executing function.

Error while querying documents Code: SC3020 The SQL query text exceeded the maximum limit of 30720 characters.

Microsoft.Azure.Documents.Common/1.20.0.0.

Was this limitation a "feature" added by Microsoft at some point?

I can't seem to find any info except this feedback suggestion: https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/32665819-increase-query-maximum-character-limit-for-cosmo-m

来源:https://stackoverflow.com/questions/48761839/the-sql-query-text-exceeded-the-maximum-limit-of-30720-characters-in-azure-cosmo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!