{"action":"created","issue":{"url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/issues/145","labels_url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/issues/145/comments","events_url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/issues/145/events","html_url":"https://github.com/UrbanCCD-UChicago/plenario/issues/145","id":48093690,"number":145,"title":"Consider flattened /api/timeseries table","user":{"login":"evz","id":551491,"avatar_url":"https://avatars.githubusercontent.com/u/551491?v=3","gravatar_id":"","url":"https://api.github.com/users/evz","html_url":"https://github.com/evz","followers_url":"https://api.github.com/users/evz/followers","following_url":"https://api.github.com/users/evz/following{/other_user}","gists_url":"https://api.github.com/users/evz/gists{/gist_id}","starred_url":"https://api.github.com/users/evz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evz/subscriptions","organizations_url":"https://api.github.com/users/evz/orgs","repos_url":"https://api.github.com/users/evz/repos","events_url":"https://api.github.com/users/evz/events{/privacy}","received_events_url":"https://api.github.com/users/evz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/labels/api","name":"api","color":"fbca04"},{"url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/labels/etl","name":"etl","color":"009800"},{"url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/labels/scaling","name":"scaling","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-11-07T15:31:17Z","updated_at":"2015-06-25T20:41:52Z","closed_at":null,"body":"This is a view that gets hit quite a lot and the query can be quite slow. @derekeder and I were thinking about it this morning and it seems like one way of improving this is to just create a flattened version of what you get back from that query and store it in a separate table that gets updated when the data gets updated. \r\n\r\nThis brings up a couple other things like how do we clean up when a dataset gets deleted but, that should be pretty straightforward if we're smart about it.\r\n\r\nRelates to #112 "},"comment":{"url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/issues/comments/115391062","html_url":"https://github.com/UrbanCCD-UChicago/plenario/issues/145#issuecomment-115391062","issue_url":"https://api.github.com/repos/UrbanCCD-UChicago/plenario/issues/145","id":115391062,"user":{"login":"derekeder","id":919583,"avatar_url":"https://avatars.githubusercontent.com/u/919583?v=3","gravatar_id":"","url":"https://api.github.com/users/derekeder","html_url":"https://github.com/derekeder","followers_url":"https://api.github.com/users/derekeder/followers","following_url":"https://api.github.com/users/derekeder/following{/other_user}","gists_url":"https://api.github.com/users/derekeder/gists{/gist_id}","starred_url":"https://api.github.com/users/derekeder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekeder/subscriptions","organizations_url":"https://api.github.com/users/derekeder/orgs","repos_url":"https://api.github.com/users/derekeder/repos","events_url":"https://api.github.com/users/derekeder/events{/privacy}","received_events_url":"https://api.github.com/users/derekeder/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T20:41:52Z","updated_at":"2015-06-25T20:41:52Z","body":"@brettjgoldstein see my previous comment. We're going to set up a [materialized view](https://wiki.postgresql.org/wiki/Materialized_Views) for the master table and see how that effects performance. Thoughts on that?"}}