Opened 15 years ago
Closed 14 years ago
#142 closed enhancement (fixed)
Make sure we're using 100% efficient queries / indexes
| Reported by: | Christopher Allan Webber | Owned by: | Christopher Allan Webber |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| Component: | programming | Keywords: | post-sql |
| Cc: | Parent Tickets: |
Description (last modified by )
Every query we use should be able to efficiently use an index, yet at the same time, we shouldn't create superflous indexes.
Related:
- http://kylebanker.com/blog/2010/09/21/the-joy-of-mongodb-indexes/
- http://www.mongodb.org/display/DOCS/Indexing+Advice+and+FAQ
- http://www.mongodb.org/display/DOCS/Indexes
Especially, we should play with using explain:
http://www.mongodb.org/display/DOCS/Indexing+Advice+and+FAQ#IndexingAdviceandFAQ-Use{{explain}}.
Assigning to myself, but feel free to claim this if you're excited about investigating.
Change History (11)
comment:1 by , 15 years ago
comment:3 by , 15 years ago
| Milestone: | 0.0.4 → 0.0.5 |
|---|
We release 0.0.4, so I'm bumping this to 0.0.5.
comment:4 by , 15 years ago
| Milestone: | 0.0.5 → 0.1.0 |
|---|
comment:5 by , 15 years ago
| Milestone: | 0.1.0 → 0.2.0 |
|---|
comment:4 by , 15 years ago
| Milestone: | 0.2.0 → 0.2.1 |
|---|---|
| Priority: | Normal → Low |
I doubt this gets adressed for 0.2.0.
And as we're concentrating on SQL now, I've set this to Low priority. It might get revisited in the SQL world again, with a lot of different meaning then. But until that time, it's surely Low priority.
comment:5 by , 14 years ago
The original url for this bug was http://bugs.foocorp.net/issues/432 .
Relations:
#241: related, #55: related, #31: blocked, #379: blocked
comment:6 by , 14 years ago
| Keywords: | post-sql added |
|---|
comment:7 by , 14 years ago
This is technically mostly relevant, just in the SQL world now. Elrond and I said we'd discuss soonish.
comment:8 by , 14 years ago
| Milestone: | 0.2.1 |
|---|---|
| Type: | defect → enhancement |
We will try to add some indexes to the sql models as we go, but this really is currently low priority and we're not aiming to adress this for the next release (because the next release aims at "get sql running").
comment:9 by , 14 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | accepted → closed |
I think we put some time into making efficient indexes, and I'm pretty sure that we'll update indexes from real actual experience as we go from here on out. I'm closing this ticket!

This bug inspired the following update to #360:
http://bugs.foocorp.net/issues/360#note-33
Here's what I propose:
These requirements should be met before merging a new index/query. The merger can then focus on evaluating the cost/benefit. I'll add unit tests and comments on #360, at least.
It's rather rigid, I suppose, but I think we need some system. Otherwise this bug could arguably be opened every time someone makes a new query or index. Under the proposed system, we can be confident the queries are locked down by unit tests. When we need a new query we could scan the indices to see if there is a suitable one already available. Likewise, we would have a way to update all the appropriate queries if we have to get rid of or change an index.