Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-964

Need help in writing ranged queries

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • Environment:
      Windows 7, 64 bit

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            Srivathsal Srivathsal Venkataramu [X]
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: