mongodb-d4 icon indicating copy to clipboard operation
mongodb-d4 copied to clipboard

Search is returning designs with empty index keys

Open apavlo opened this issue 13 years ago • 3 comments
trafficstars

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.

apavlo avatar Oct 15 '12 14:10 apavlo

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?

yangzou avatar Oct 21 '12 22:10 yangzou

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.

apavlo avatar Oct 22 '12 19:10 apavlo

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.

yangzou avatar Oct 22 '12 23:10 yangzou