rethinkdbdash
rethinkdbdash copied to clipboard
Prod mode
The drive should have two mode, prod and dev (which we should be able to set per query in run).
In prod, these queries should print a warning (the first time) and suggest to use an index.
r.table("posts").orderBy("field")
r.table("posts").filter({field: "value"})
r.table("posts").group("date")
The question are:
- What the default should be?
- Can we catch some
filterthat should bebetweentoo?
Note: Accidentally opened on rethinkdb -_- https://github.com/rethinkdb/rethinkdb/issues/3247
Perhaps in addition to printing a warning, these stats could be accumulated internally and you could retrieve them later via something like rethinkdbdash.report(). This would allow you to run tests, for example, and then assert that indexes were used appropriately.
[
{
"table": <table_name>,
"queries": <count>,
"index_hit": {
"field": <count>,
"date": <count>
},
"index_miss": {
"field": <count>,
"date": <count>
}
},
...
]