Azure / azure-cosmos-table-dotnet

.NET SDK for Azure Cosmos Table API
14 stars 6 forks source link

ExecuteQuery() / ExecuteQuerySegmented() Consumes Extraordinary Amount of Memory #55

Closed p1kawang closed 4 years ago

p1kawang commented 4 years ago

Hi,

SDK: Microsoft.Azure.Cosmos.Table(1.0.6) I'm using this SDK to query my Cosmos Table. I build a filter on two property columns. The query sometimes takes seconds to complete wtih RAM usaged around 250mb. But in most case, it takes around 10 mintues and over 5Gb RAM to complete. This problem shows up on both of ExecuteQuery() and ExecuteQuerySegmented(). Does anyone have idea how to solve this problem? image

var startTimeFilter = TableQuery.GenerateFilterCondition("StartTime", QueryComparisons.NotEqual, "");
var endTimeFilter = TableQuery.GenerateFilterCondition("EndTime", QueryComparisons.NotEqual, "");
var filter = TableQuery.CombineFilters(startTimeFilter, TableOperators.And, endTimeFilter);
var query = new TableQuery<TableEntityAdapter<MyEntity>>().Where(filter).Take(1000);
p1kawang commented 4 years ago

Upgrade to 2.0.0. The problem is solved.