docs icon indicating copy to clipboard operation
docs copied to clipboard

API: add time complexity to commands

Open mglukhovsky opened this issue 12 years ago • 1 comments

@kevincox said this in the original issue (rethinkdb/rethinkdb#620):

When selecting and designing with a database it is important to know the cost of what queries in what situations. For example, it is often reasonable to use a quadratic query, if you know the size of your dataset will be under a certain size.

It would be very useful to have the expected time complexities of the queries in the documentation and the cases for which the complexity will be different. This is something that Redis does really well for example.

This was met with complete agreement by everyone involved.

mglukhovsky avatar Oct 28 '13 22:10 mglukhovsky

As a minor improvement until we fully get there, I think we should add a remark to the filter API docs that it performs a full linear scan of the input sequence and doesn't make use of indexes. We should then suggest using get_all as an alternative where possible.

A lot of people coming from an SQL or MongoDB background expect indexes to be used automatically, which is not the case for ReQL.

We already have similar notes the API docs for inner_join and outer_join.

danielmewes avatar Oct 16 '14 19:10 danielmewes