Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMIT without ORDER BY doesn't result in same output every time #19

Open
PietrH opened this issue Feb 10, 2023 · 0 comments
Open

LIMIT without ORDER BY doesn't result in same output every time #19

PietrH opened this issue Feb 10, 2023 · 0 comments
Assignees
Labels
actionable Can be implemented

Comments

@PietrH
Copy link
Member

PietrH commented Feb 10, 2023

Currently in some test, for example for get_acoustic_detections(), limit=TRUE is used to save on time, however, it's not guaranteed that the output of the query will be the same every time if we don't add an ORDER BY to the query

https://stackoverflow.com/questions/37470753/if-i-run-a-sql-statement-multiple-times-with-row-limit-will-i-get-the-same-resu

If using a limit, we should probably add ORDER BY on the primary key to the query to preserve repeatability for testing

https://stackoverflow.com/questions/39680598/querying-with-limit-and-offset-is-there-a-chance-to-have-different-results-with

https://stackoverflow.com/questions/59496627/why-does-sql-limit-clause-returns-random-rows-for-every-query

@PietrH PietrH added the actionable Can be implemented label Feb 10, 2023
@PietrH PietrH self-assigned this Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Can be implemented
Projects
None yet
Development

No branches or pull requests

1 participant