I have a field in my collection which is a String in nature. When i run aggregation for this field in data it takes considerable time in aggregation. Total 6 million records are in collection which has almost 500k different value for this field.
I am in impression if a field is numeric with similar scenario then aggregation on that field will be very fast.
So i planned to save the string as unique integer value by converting it java biginteger but mongo does not support that. Could you please suggest me what could be the best possible way for this.
Aucun commentaire:
Enregistrer un commentaire