[SERVER-3260] Prefix Indexes Created: 14/Jun/11 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Benjamin Darfler | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 17 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
It would be great if we could specify indexes that only index on the prefix of a field. i.e. for BinData on the first n bytes, for strings on the first n characters, etc. This might not work on all data types but it is a great tool for trimming index sizes when applicable. |
| Comments |
| Comment by Grigorii Eremeev [ 11/May/17 ] |
|
Hey guys, when will you implement this feature? |
| Comment by Chad Kreimendahl [ 20/Aug/14 ] |
|
This would allow for several benefits:
|
| Comment by Chad Kreimendahl [ 20/Aug/14 ] |
|
See our related one. Since 2.6 this has become far more important. I think under nearly all circumstances we would limit every text field we index to something fairly small. |
| Comment by Mark Callaghan [ 13/Mar/14 ] |
|
This will help with long index keys. Pre-2.6 behavior is to let insert/update succeed and skip index maintenance when the index key is too long. This is bad for index scans that will miss the unindexed doc. 2.6 changed the server to raise an error and make the insert/update fail. This makes the index correct but will be a problem for some existing apps. Prefix keys are the solution. |
| Comment by charity majors [ 10/Mar/14 ] |
|
Any plans to implement this soon? It would really help ease the transition to a world where keys too large to index don't get inserted. |