Open cvalaas opened 6 months ago
https://github.com/mozilla-services/syncstorage-rs/blob/8faf7280de843b5d398aeb997c99aebfdc5d9a8c/tools/tokenserver/database.py#L96
This "order by" means the database has to sort ALL the matching records, then return the first 10 (default, and subject to an offset). If we don't need the ordering, then the database can respond much faster.
┆Issue is synchronized with this Jira Task
This is probably an unnoticeable slowdown normally, but given that we haven't cleared out records in a while, this could be big
https://github.com/mozilla-services/syncstorage-rs/blob/8faf7280de843b5d398aeb997c99aebfdc5d9a8c/tools/tokenserver/database.py#L96
This "order by" means the database has to sort ALL the matching records, then return the first 10 (default, and subject to an offset). If we don't need the ordering, then the database can respond much faster.
┆Issue is synchronized with this Jira Task