[SERVER-9306] Ability to temporarily forbid query optimizer from using index ("invisible index") Created: 09/Apr/13  Updated: 06/Dec/22  Resolved: 23/Apr/20

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Querying
Affects Version/s: None
Fix Version/s: 4.4.0-rc3, 4.7.0

Type: New Feature Priority: Major - P3
Reporter: Adam Flynn Assignee: Backlog - Query Team (Inactive)
Resolution: Done Votes: 9
Labels: query_triage, storch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-10674 Ability to narrowly scope potential i... Closed
is duplicated by SERVER-26589 make the mongodb support invisible index Closed
Problem/Incident
causes SERVER-47846 CollMod (_collModInternal) unsafely a... Closed
causes SERVER-48047 Do not generate "hidden" field in opl... Closed
Related
related to SERVER-47275 Take over and complete Hidden Indexes PR Closed
related to SERVER-54646 Hide/unhide indexes on a time-series ... Closed
is related to SERVER-8871 Support admin hints per query pattern Closed
is related to SERVER-44432 Per index access stats Closed
Assigned Teams:
Query
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Query 2018-03-12, Query 2018-03-26, Execution Team 2020-03-09, Execution Team 2020-03-23
Participants:
Case:
Linked BF Score: 88

 Description   

It would be helpful if there was a way to disable an index before dropping. Been clearing out some unused production indexes lately, but there's always a tense moment after issuing the dropIndex command where I wait to see if it was less "unused" than expected.

If there was a way to just disable the index (semantics would be that it keeps getting updated, just can't be used by queries), then a revert would be much faster if something goes wrong and the drop could be done with more confidence.



 Comments   
Comment by Githook User [ 24/Apr/20 ]

Author:

{'name': 'Zhihui Fan', 'email': 'yizhi.fzh@alibaba-inc.com', 'username': 'zhihuiFan'}

Message: SERVER-9306 Ability to temporarily forbid query optimizer from using index ("Hidden Index") SERVER-47275 Take over and complete Hidden Indexes PR

Co-authored-by: Ruoxin Xu <ruoxin.xu@mongodb.com>

(cherry picked from commit bad7c538e7efbc996a6089e1569681edf24e6b33)
Branch: v4.4
https://github.com/mongodb/mongo/commit/340222f5e2005fcf734a65e269c52572f9b0b2cb

Comment by Githook User [ 22/Apr/20 ]

Author:

{'name': 'Zhihui Fan', 'email': 'yizhi.fzh@alibaba-inc.com', 'username': 'zhihuiFan'}

Message: SERVER-9306 Ability to temporarily forbid query optimizer from using index ("Hidden Index") SERVER-47275 Take over and complete Hidden Indexes PR

Co-authored-by: Ruoxin Xu <ruoxin.xu@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/bad7c538e7efbc996a6089e1569681edf24e6b33

Comment by Daniel Gottlieb (Inactive) [ 26/Mar/20 ]

My CR is complete with outstanding (but trivial) changes requested. Assigning back to query to follow up.

Comment by Ian Whalen (Inactive) [ 23/Feb/18 ]

Assigning to david.storch to do an initial review of the PR for potential upgrade/downgrade complexities.

Comment by Ivan Artemov [ 20/Jan/18 ]

I think, you need use "Invisible index" name in title

Comment by Adam Flynn [ 30/Mar/16 ]

Thanks Asya - looks like that'll address this use-case nicely.

Comment by Asya Kamsky [ 30/Mar/16 ]

Please note that for this particular described use case, 3.2 indexStats allows you to see the index usage.

Generated at Thu Feb 08 03:20:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.