{"action":"created","issue":{"url":"https://api.github.com/repos/crate/crate/issues/2933","labels_url":"https://api.github.com/repos/crate/crate/issues/2933/labels{/name}","comments_url":"https://api.github.com/repos/crate/crate/issues/2933/comments","events_url":"https://api.github.com/repos/crate/crate/issues/2933/events","html_url":"https://github.com/crate/crate/issues/2933","id":117563014,"number":2933,"title":"Replication decreases query performance","user":{"login":"benjaminrigaud","id":1983087,"avatar_url":"https://avatars.githubusercontent.com/u/1983087?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminrigaud","html_url":"https://github.com/benjaminrigaud","followers_url":"https://api.github.com/users/benjaminrigaud/followers","following_url":"https://api.github.com/users/benjaminrigaud/following{/other_user}","gists_url":"https://api.github.com/users/benjaminrigaud/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminrigaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminrigaud/subscriptions","organizations_url":"https://api.github.com/users/benjaminrigaud/orgs","repos_url":"https://api.github.com/users/benjaminrigaud/repos","events_url":"https://api.github.com/users/benjaminrigaud/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminrigaud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-18T10:58:15Z","updated_at":"2015-11-19T14:56:59Z","closed_at":null,"body":"When I configure replication (I tried with 1), all my queries are far slower.\r\n\r\nI have a cluster of 4 machines with 2 ssd, no load and launching one query at a time.\r\nMy database has 4 shards and is partitionned by month (on 3 months) with 180M documents following this schema:\r\n\r\n```\r\nid long \r\ncol_1 integer \r\ncol_2 integer \r\ncol_3 integer \r\ncol_4 integer \r\ncol_5 integer \r\ncol_6 integer \r\nobject_id integer \r\nobject2_id integer \r\nobject3_id integer \r\nobject4_id integer \r\nstart_time timestamp \r\nstart_time__yearmonth timestamp \r\ncol_7 boolean\r\n```\r\n\r\nA query such as:\r\n\r\n```sql\r\nSELECT COUNT(*), AVG(col_1), start_time__yearmonth from events WHERE start_time__yearmonth = '201510' GROUP BY start_time__yearmonth;\r\n```\r\n\r\nIs 2-3 times slower (went from 3s to 7-9s).\r\n\r\nI tried crate 0.51.7 and 0.52.2.\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28353970-replication-decreases-query-performance?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F505659&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/crate/crate/issues/comments/158081133","html_url":"https://github.com/crate/crate/issues/2933#issuecomment-158081133","issue_url":"https://api.github.com/repos/crate/crate/issues/2933","id":158081133,"user":{"login":"benjaminrigaud","id":1983087,"avatar_url":"https://avatars.githubusercontent.com/u/1983087?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminrigaud","html_url":"https://github.com/benjaminrigaud","followers_url":"https://api.github.com/users/benjaminrigaud/followers","following_url":"https://api.github.com/users/benjaminrigaud/following{/other_user}","gists_url":"https://api.github.com/users/benjaminrigaud/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminrigaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminrigaud/subscriptions","organizations_url":"https://api.github.com/users/benjaminrigaud/orgs","repos_url":"https://api.github.com/users/benjaminrigaud/repos","events_url":"https://api.github.com/users/benjaminrigaud/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminrigaud/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T14:56:59Z","updated_at":"2015-11-19T14:56:59Z","body":"Am using Ubuntu 14.04 and all communications are going over openVPN.\r\n\r\nSimilar queries with an elasticsearch client or kibana are working fine (2-3s).\r\n"}}