-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
CSV export doesn't keep order #2580
Comments
This happens to me also, I'm using version 0.6.0 though |
I recently ran into this. The CSV row order is determined by the database primary key, as it uses find_each to avoid loading all records into memory simultaneously. see this code: Rails requires ordering by primary key for Some potential solutions may include rewriting to use a streaming SQL query, or using some form of pagination. This may expose performance problems as arbitrary sorting and filtering without indexes at large scale is problematic. EDIT: here are some logs confirming the problem when exporting to CSV -- Without making any specific promises, I'm going to attempt to hack a solution this week. |
I just came across the need to sort and filter data and export it as a CSV file. While filtering and exporting works just fine the order is reset to the default database order. It doesn't keep the order from the list view for exported data. Is this the expected behavior and if so, could we change this?
I hope I didn't miss something. Thanks in advance!
The text was updated successfully, but these errors were encountered: