{"action":"created","issue":{"url":"https://api.github.com/repos/jakob/Postico/issues/16","labels_url":"https://api.github.com/repos/jakob/Postico/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/jakob/Postico/issues/16/comments","events_url":"https://api.github.com/repos/jakob/Postico/issues/16/events","html_url":"https://github.com/jakob/Postico/issues/16","id":90240552,"number":16,"title":"Rows Per Page suggestion","user":{"login":"corgus","id":3866184,"avatar_url":"https://avatars.githubusercontent.com/u/3866184?v=3","gravatar_id":"","url":"https://api.github.com/users/corgus","html_url":"https://github.com/corgus","followers_url":"https://api.github.com/users/corgus/followers","following_url":"https://api.github.com/users/corgus/following{/other_user}","gists_url":"https://api.github.com/users/corgus/gists{/gist_id}","starred_url":"https://api.github.com/users/corgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corgus/subscriptions","organizations_url":"https://api.github.com/users/corgus/orgs","repos_url":"https://api.github.com/users/corgus/repos","events_url":"https://api.github.com/users/corgus/events{/privacy}","received_events_url":"https://api.github.com/users/corgus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-22T23:20:41Z","updated_at":"2015-06-23T16:15:23Z","closed_at":null,"body":"The table preview (viewing paginated records of a table after clicking it) is an excellent idea, but is taking a long time for a large database (10M rows in my case).\r\n\r\nSuggestion: use LIMIT in the query, and the Preferences 'Rows per page' as the value.\r\n(to return SELECT * FROM db LIMIT 20 in this case)\r\n\r\n![screen shot 2015-06-22 at 4 15 36 pm](https://cloud.githubusercontent.com/assets/3866184/8295483/fbe673c4-18f9-11e5-98bc-14939b8a004e.png)\r\n\r\nCould reduce execution time 1000x (17.8s - 22ms in this example):\r\n\r\n![screen shot 2015-06-22 at 4 17 24 pm](https://cloud.githubusercontent.com/assets/3866184/8295520/4625a81a-18fa-11e5-9ec9-42cdd1b26cc2.png)\r\n\r\nrelated: #7"},"comment":{"url":"https://api.github.com/repos/jakob/Postico/issues/comments/114560464","html_url":"https://github.com/jakob/Postico/issues/16#issuecomment-114560464","issue_url":"https://api.github.com/repos/jakob/Postico/issues/16","id":114560464,"user":{"login":"corgus","id":3866184,"avatar_url":"https://avatars.githubusercontent.com/u/3866184?v=3","gravatar_id":"","url":"https://api.github.com/users/corgus","html_url":"https://github.com/corgus","followers_url":"https://api.github.com/users/corgus/followers","following_url":"https://api.github.com/users/corgus/following{/other_user}","gists_url":"https://api.github.com/users/corgus/gists{/gist_id}","starred_url":"https://api.github.com/users/corgus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corgus/subscriptions","organizations_url":"https://api.github.com/users/corgus/orgs","repos_url":"https://api.github.com/users/corgus/repos","events_url":"https://api.github.com/users/corgus/events{/privacy}","received_events_url":"https://api.github.com/users/corgus/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T16:15:23Z","updated_at":"2015-06-23T16:15:23Z","body":"Ah, yea it seems ordering would be the culprit, which would be necessary for pagination, hmmm...\r\n\r\nPersonally, I would use the 'table view' to get a preview of the tables (to get relations and some sample data, limited to 100 random samples for example), and use this to build queries in the SQL Query module, sorting there as necessary. One solution might be to default as 'preview' (disable pagination) for large tables and allow pagination for smaller?\r\n\r\n@qwesda - This table is from geonames, downloadable here as 'allCountries.zip': http://download.geonames.org/export/dump/\r\nAfter unzipping, this little tutorial has a pretty good explanation on getting the txt to db table:\r\nhttp://jamescreel.net/blog/utilizing-the-geonames-dataset-in-postgres/\r\n\r\n"}}