ioet / ioet/time-tracker-backend
Improve use of OFFSET, LIMIT in CosmosDBRepository class
- Dominant language
- Python
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently, all our query operations use `OFFSET LIMIT ` in the query string. This works ok at the moment, as the number of items in our containers is "little" (is not in the order of 100.000 or 1'.000.000).
In containers like `time_entry` the number of items grows quickly. Combined with recurrent use of OFFSET & LIMIT in query operations, we could experiment some performance issues and high costs, in the future.
We should improve this, as a preventive action.
References:
- https://tusharsharma.dev/posts/api-pagination-the-right-way
- https://phauer.com/2017/web-api-pagination-continuation-token/#offset-pagination
- https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-offset-limit
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.