mongodb-d4
mongodb-d4 copied to clipboard
Search is returning designs with empty index keys
Right now the search process is generating designs that have collections without indexes. This is even though the InitialDesigner is producing designs with the proper indexes. Somehow we are generating intermediate designs that do not have these indexes and the costmodel is telling us that they are better.
I don't think this is a bug...this happens because it doesn't run until some keys get selected for that collection. Do you @apavlo think we should insert the initial designs for that collection into the final solution if the collection in final solution has empty index or shard keys?
No, that's a hack. The penalty for not selecting indexes on collections that have queries that could use them should be great enough that the designer will never choose a design without them.
Yes. You are right. But this kind of condition happens...that when the time limit is reached, the design with indexes hasn't been evaluated yet.