{"action":"created","issue":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/3474","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/3474/labels{/name}","comments_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/3474/comments","events_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/3474/events","html_url":"https://github.com/rethinkdb/rethinkdb/issues/3474","id":53008796,"number":3474,"title":"Why count on index'ed field takes so long to complete?","user":{"login":"nbhatti","id":643569,"avatar_url":"https://avatars.githubusercontent.com/u/643569?v=3","gravatar_id":"","url":"https://api.github.com/users/nbhatti","html_url":"https://github.com/nbhatti","followers_url":"https://api.github.com/users/nbhatti/followers","following_url":"https://api.github.com/users/nbhatti/following{/other_user}","gists_url":"https://api.github.com/users/nbhatti/gists{/gist_id}","starred_url":"https://api.github.com/users/nbhatti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbhatti/subscriptions","organizations_url":"https://api.github.com/users/nbhatti/orgs","repos_url":"https://api.github.com/users/nbhatti/repos","events_url":"https://api.github.com/users/nbhatti/events{/privacy}","received_events_url":"https://api.github.com/users/nbhatti/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/19","labels_url":"https://api.github.com/repos/rethinkdb/rethinkdb/milestones/19/labels","id":299349,"number":19,"title":"notabug","description":"It's a feature. The issue describes a RethinkDB feature or design choice as if it was a bug.","creator":{"login":"AtnNn","id":706854,"avatar_url":"https://avatars.githubusercontent.com/u/706854?v=3","gravatar_id":"","url":"https://api.github.com/users/AtnNn","html_url":"https://github.com/AtnNn","followers_url":"https://api.github.com/users/AtnNn/followers","following_url":"https://api.github.com/users/AtnNn/following{/other_user}","gists_url":"https://api.github.com/users/AtnNn/gists{/gist_id}","starred_url":"https://api.github.com/users/AtnNn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AtnNn/subscriptions","organizations_url":"https://api.github.com/users/AtnNn/orgs","repos_url":"https://api.github.com/users/AtnNn/repos","events_url":"https://api.github.com/users/AtnNn/events{/privacy}","received_events_url":"https://api.github.com/users/AtnNn/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":74,"state":"closed","created_at":"2013-03-29T21:07:05Z","updated_at":"2015-01-08T23:13:43Z","due_on":null,"closed_at":"2013-05-13T23:08:44Z"},"comments":4,"created_at":"2014-12-28T20:16:32Z","updated_at":"2015-01-08T23:13:43Z","closed_at":"2015-01-08T23:13:43Z","body":"I have around 17 million documents in a table and have 1 index on a field called 'billsec' Running a simple count query takes around 10 seconds to complete.  CPU on the server is not moving much. Is this normal or am I missing something? Running the same query second time takes less time. Is this because the indexes have to be read from the disk?\r\n\r\nHere is the gist for query profile, https://gist.github.com/nbhatti/54f39a49a46c9738dadc and the query itself is ```r.db('vg').table('cdrs').between(25, 30, {index: 'billsec'}).count()```\r\nIf I increase the filter like, from 20 to 30 for between, it takes forever for the query to finish.\r\n\r\nI am running 1.15.2 on Ubuntu 14.10 with 12 Cores 64 GB RAM and cache-size=20024. \r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/comments/69267609","html_url":"https://github.com/rethinkdb/rethinkdb/issues/3474#issuecomment-69267609","issue_url":"https://api.github.com/repos/rethinkdb/rethinkdb/issues/3474","id":69267609,"user":{"login":"danielmewes","id":505365,"avatar_url":"https://avatars.githubusercontent.com/u/505365?v=3","gravatar_id":"","url":"https://api.github.com/users/danielmewes","html_url":"https://github.com/danielmewes","followers_url":"https://api.github.com/users/danielmewes/followers","following_url":"https://api.github.com/users/danielmewes/following{/other_user}","gists_url":"https://api.github.com/users/danielmewes/gists{/gist_id}","starred_url":"https://api.github.com/users/danielmewes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielmewes/subscriptions","organizations_url":"https://api.github.com/users/danielmewes/orgs","repos_url":"https://api.github.com/users/danielmewes/repos","events_url":"https://api.github.com/users/danielmewes/events{/privacy}","received_events_url":"https://api.github.com/users/danielmewes/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T23:13:43Z","updated_at":"2015-01-08T23:13:43Z","body":"(Closing as notabug, but please let us know if you need more help with this)"}}