You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
r.table('foo').count() should be constant time #152
Marking as high priority. This is becoming progressively more important as RethinkDB matures, particularly because of #1271, #1984, approximate document count in the web ui that always confuses people, etc.
This came up again recently due to some seriously bad behavior in the document estimation code. If we had constant time count() we could skip all of the estimating
Isn't size a better term for the number of items in a table and/or index?
It makes sense that size could be trivially (cheaply) available where a count normally costs the same as a query minus the fetching of data (and probably should be avoided).
@malthe That's a decent point. On the other hand count as a term has the advantage that it makes clear that the number of entries is returned (and not for example their size in bytes). It probably makes more sense to think about naming when we actually have a constant-time count/size operation...
@coffeemug right, but count is basically sum(select 1 from ...) while the index size is not a query as such (it's a kind of metadata). I mean obviously you know this, but I think it's an important difference to communicate.
Activity
coffeemug commentedon Mar 18, 2013
Related to #53, FYI.
srh commentedon Aug 12, 2013
Maybe also support efficient
count()for range queries that use indexes or the primary key.coffeemug commentedon Jul 2, 2014
Marking as high priority. This is becoming progressively more important as RethinkDB matures, particularly because of #1271, #1984, approximate document count in the web ui that always confuses people, etc.
pilwon commentedon Aug 13, 2014
It would be great to show these table doc counts beside the live icons of the
/#tablesadmin page, oncecount()becomes constant time.29 remaining items
deontologician commentedon Dec 12, 2014
This came up again recently due to some seriously bad behavior in the document estimation code. If we had constant time count() we could skip all of the estimating
danielmewes commentedon Dec 12, 2014
@deontologician Note that the specific problem is likely going away with #2034 (comment) though.
deontologician commentedon Dec 12, 2014
True, but really the problem is that we have estimates at all.
On Fri, Dec 12, 2014 at 2:07 PM, Daniel Mewes [email protected]
wrote:
malthe commentedon Jan 14, 2015
Isn't
sizea better term for the number of items in a table and/or index?It makes sense that
sizecould be trivially (cheaply) available where acountnormally costs the same as a query minus the fetching of data (and probably should be avoided).danielmewes commentedon Jan 14, 2015
@malthe That's a decent point. On the other hand
countas a term has the advantage that it makes clear that the number of entries is returned (and not for example their size in bytes). It probably makes more sense to think about naming when we actually have a constant-time count/size operation...coffeemug commentedon Jan 16, 2015
Also, SQL uses
count, which is why we appropriated the name.malthe commentedon Jan 16, 2015
@coffeemug right, but count is basically
sum(select 1 from ...)while the index size is not a query as such (it's a kind of metadata). I mean obviously you know this, but I think it's an important difference to communicate.danielmewes commentedon May 24, 2016
Closing in favor of #3949
board: tick rethinkdb#152 — LIGHT AUDIT idle (0 pending tasks; gitrei…