[CSHARP-964] Need help in writing ranged queries Created: 30/Apr/14  Updated: 05/Apr/19  Resolved: 04/Apr/15

Status: Closed
Project: C# Driver
Component/s: Performance
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Srivathsal Venkataramu [X] Assignee: Unassigned
Resolution: Done Votes: 0
Labels: performance, query, question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7, 64 bit



 Description   

Skip and take in Linq does not suit the requirement of my application. I have 30 fields in a document on which the query could be filtered or sorted in any combination. Should I create indexes for all the columns?

For e.g. I have a query like "Select * From Table Where [Col1] Like 'Error' And [Col2] > 3 Order by [Col3]" and I have the row number from which I want to see the results from and the count of how many rows I want. I tried with skip and take, It threw an exception saying "Overflow sort stage buffered data usage of 33554777 bytes exceeds internal limit of 33554432 bytes". Range based queries means relying on an index to set the range right? How can I do that in my example? I need to see if I can achieve better performance in scrolling through the log file and jump to any page in no time. The results could be filtered and sorted too and I cannot keep the whole file in memory.


Generated at Wed Feb 07 21:38:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.