{"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/35#issuecomment-622213950", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/35", "id": 622213950, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjIxMzk1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T02:09:04Z", "updated_at": "2020-05-01T02:09:04Z", "author_association": "MEMBER", "body": "It sped up this query a lot - 2.5s down to 300ms:\r\n```sql\r\nselect\r\n repos.full_name,\r\n json_object(\r\n 'href', 'https://github.com/' || repos.full_name || '/issues/' || issues.number,\r\n 'label', '#' || issues.number\r\n ) as issue,\r\n issues.title,\r\n users.login,\r\n users.id,\r\n issues.state,\r\n issues.locked,\r\n issues.assignee,\r\n issues.milestone,\r\n issues.comments,\r\n issues.created_at,\r\n issues.updated_at,\r\n issues.closed_at,\r\n issues.author_association,\r\n issues.pull_request,\r\n issues.repo,\r\n issues.type\r\nfrom\r\n issues\r\n join repos on repos.id = issues.repo\r\n join users on issues.user = users.id\r\nwhere\r\n issues.state = 'open'\r\n and issues.user not in (9599, 27856297)\r\n and not exists (\r\n select\r\n id\r\n from\r\n issue_comments\r\n where\r\n issue_comments.user = 9599\r\n and issues.id = issue_comments.issue\r\n )\r\norder by\r\n issues.updated_at desc;\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 610511450, "label": "Create index on issue_comments(user) and other foreign keys"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/35#issuecomment-622214262", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/35", "id": 622214262, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjIxNDI2Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T02:10:32Z", "updated_at": "2020-05-01T02:11:19Z", "author_association": "MEMBER", "body": "This sped that query up even more - down to 4ms.\r\n```sql\r\ncreate index issue_comments_issue on issue_comments(issue);\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 610511450, "label": "Create index on issue_comments(user) and other foreign keys"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/36#issuecomment-622461025", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/36", "id": 622461025, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjQ2MTAyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T16:34:24Z", "updated_at": "2020-05-01T16:34:24Z", "author_association": "MEMBER", "body": "Blocked on #37", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 610842926, "label": "Add view for better display of dependent repos"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/10#issuecomment-622461122", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/10", "id": 622461122, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjQ2MTEyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T16:34:39Z", "updated_at": "2020-05-01T16:34:39Z", "author_association": "MEMBER", "body": "Blocked on #37", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 516967682, "label": "Add this repos_starred view"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/12#issuecomment-622461223", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/12", "id": 622461223, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjQ2MTIyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T16:34:52Z", "updated_at": "2020-05-01T16:34:52Z", "author_association": "MEMBER", "body": "Blocked on #37", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 520756546, "label": "Add this view for seeing new releases"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/37#issuecomment-622461537", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/37", "id": 622461537, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjQ2MTUzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T16:35:40Z", "updated_at": "2020-05-01T16:35:40Z", "author_association": "MEMBER", "body": "This will check if the view exists and has the exact same matching definition as the one we want. If it doesn't, we will drop it (if it exists) and recreate it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 610843136, "label": "Mechanism for creating views if they don't yet exist"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/github-to-sqlite/issues/37#issuecomment-622461948", "issue_url": "https://api.github.com/repos/dogsheep/github-to-sqlite/issues/37", "id": 622461948, "node_id": "MDEyOklzc3VlQ29tbWVudDYyMjQ2MTk0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-01T16:36:42Z", "updated_at": "2020-05-01T16:36:42Z", "author_association": "MEMBER", "body": "It should only create views if the underlying tables exist.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 610843136, "label": "Mechanism for creating views if they don't yet exist"}, "performed_via_github_app": null}