{"html_url": "https://github.com/simonw/datasette/issues/266#issuecomment-389894382", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/266", "id": 389894382, "node_id": "MDEyOklzc3VlQ29tbWVudDM4OTg5NDM4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-17T14:51:13Z", "updated_at": "2018-05-17T14:53:23Z", "author_association": "OWNER", "body": "I should definitely sanity check if the `_next=` route really is the most efficient way to build this. It may turn out that iterating over a SQLite cursor with a million rows in it is super-efficient and would provide much more reliable performance (plus solve the problem for retrieving full custom SQL queries where we can't do keyset pagination).\r\n\r\nProblem here is that we run SQL queries in a thread pool. A query that returns millions of rows would presumably tie up a SQL thread until it has finished, which could block the server. This may be a reason to stick with `_next=` keyset pagination - since it ensures each SQL thread yields back again after each 1,000 rows.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323681589, "label": "Export to CSV"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/266#issuecomment-389893810", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/266", "id": 389893810, "node_id": "MDEyOklzc3VlQ29tbWVudDM4OTg5MzgxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-05-17T14:49:35Z", "updated_at": "2018-05-17T14:49:35Z", "author_association": "OWNER", "body": "Idea: add a `supports_csv = False` property to `BaseView` and over-ride it to `True` just on the view classes that should support CSV (Table and Row). Slight subtlety: the `DatabaseView` class only supports CSV in the `custom_sql()` path. Maybe that needs to be refactored a bit.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 323681589, "label": "Export to CSV"}, "performed_via_github_app": null}