[DocumentDB] Allow Paging (skip/take)
Allowing paging would be huge. Btw, Thank You for rolling out this feature at all! It looks wonderful! Can't wait to try it! However, I won't be able to use it for actual work projects until it supports paging and sorting.
Work on making this feature available in all SDK’s as well as cross-partition is now available so marking this as complete.
The team has seen your feedback regarding performance for queries with especially large OFFSET values and is currently working on optimizing these by better utilizing the index and further improving performance. These optimizations will be released shortly.
For more information on Offset/Limit please see, https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-offset-limit
Martin Svensson commented
Please give an update. I rather know it's a full year than not knowing at all.
LIMIT alongwith SKIP is so helpful for pagination, its something that lacking in Table storage too, so at least do this here to documentDB, without it db is not of much use
any updates on this please?
Yes please. Not sure I can suggest using this product unless this feature is readily available at query time. I tried using FeedOptions.MaxItemCount in NodeJS and it did not work. But still, seriously, why wouldn't there be the option in place already for the "ANSI SQL" way.
Please update with planned release date...
Have you any idea of release skip take?
This looks really good, but I can't use it without a take/skip feature :(
Dervanil Junior commented
When this feature will be available?
Any update on how to do paging on the DocumentsDB, i have a a collection where i am storing all the request thats happening on my website. I am displaying these request on another page but there is no way i can only get 10 items at one time from the DocumentsDB.
Mark Nickeson commented
Try using FeedOptions.MaxItemCount.
This would be super helpful when driving a UI straight from DocumentDB. The primary rule of scaling any UI to handle millions of records is to implement paging everywhere. Please don't implement it with continuation tokens the way Azure Table Storage did. That's very hard to consume in a UI. You have to store the previous token in a session (which is not scalable) so the user can navigate backwards. Plus, there's no way to tell the user how many pages there are total.
An implementation more akin to SQL's skip/take/limit would be much more usable. Also, pagination is not very useful unless it can also be ordered by some criteria. Therefore, please remember to include an "order by" clause that can be used in conjunction with the skip/take/limit clause.
This is needed for paging scenarios. This would be much more powerful if we had "order by" and "skip" commands to use in conjunction with a "limit" command.
I want this feature as well
Luis Delgado commented
implement the capability to limit the results that come back from the Azure DocumentDB collection, for example, 'LIMIT 1000' will return only the first 1000 rows the meet the query filter.