[SERVER-60649] Show clustered index on timeseries collection as an index on time to users Created: 13/Oct/21 Updated: 09/Jun/22 Resolved: 09/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Fausto Leyva (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | execution-product-sync, time-series | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Sprint: | Execution Team 2022-05-16, Execution Team 2022-05-30, Execution Team 2022-06-13 | ||||||||
| Participants: | |||||||||
| Description |
|
Time-series collections show no indexes by default. After We should take this a step further and have listIndexes show the clustered index on _id for the buckets collection, and when listIndexes is run on a time-series collection transform that the spec by showing an index on time. |
| Comments |
| Comment by Fausto Leyva (Inactive) [ 09/Jun/22 ] |
|
The original goal of this ticket was to reduce user confusion and although the change would increase clarity when running listIndexes on a time-series collection, michael.gargiulo@mongodb.com is concerned we would encounter some confusion when differentiating between the clustered index and a secondary index on time (required to avoid index key name collisions when passing an index as a hint). Seeing as we rely heavily on hints for sorting, we are closing the ticket as we no longer see this ticket being as beneficial as originally intended. |
| Comment by David Percy [ 01/Apr/22 ] |
|
We should consider how listIndexes and hints interact. On a normal collection you can take any 'key' returned by listIndexes and pass it in as a hint. If two indexes have the same key, you get an error: "Hint matched multiple indexes, must hint by index name." If we made time-series collections report a fake index on {time: 1}, would hint({time: 1}) do a clustered collscan? (You can already hint a clustered collscan with {$natural: 1}.) If there's also a secondary index on {time: 1}, would hint({time: 1}) be ambiguous and raise that error? |
| Comment by Daniel Gomez Ferro [ 21/Jan/22 ] |
|
From
|