These are chat archives for Automattic/mongoose

3rd
Oct 2018
Hitesh Joshi
@evoxtorm
Oct 03 2018 04:27
Hey @lineus I've done the indexing of the production database collection but still it's taking the same time ???
and Index will also work on aggregate queries ????
Hitesh Joshi
@evoxtorm
Oct 03 2018 05:28
I've made the indexes but still they time is same??
Hitesh Joshi
@evoxtorm
Oct 03 2018 05:35
When using explain the code is giving error . I'm using
{
     explain: true
}
I've also used
db.collection.explain().aggregate[()] as well but still it is giving error
Ben Chiciudean
@benydc
Oct 03 2018 13:35
I have document in a collection, can I create another doc in a different collection with same id from previouse doc?
Kev
@lineus
Oct 03 2018 13:45
@benydc yeah, you should be able to. The unique index on the _id path is created at the collection level.
Ben Chiciudean
@benydc
Oct 03 2018 13:47
thanks
Kev
@lineus
Oct 03 2018 13:51
@evoxtorm { explain: true } isn't going to work. you need to choose a verbosity mode, probably 'queryPlanner' to see the indexes in use for the query. Try { explain: 'queryPlanner' } instead.
the different verbosity modes are described here
Kev
@lineus
Oct 03 2018 14:50
here's an example of two queries using the explain query helper. One has an index, one doesn't. The results returned from explain are detailed here
Hitesh Joshi
@evoxtorm
Oct 03 2018 15:46
Thanks a lot man
Kev
@lineus
Oct 03 2018 15:56
anytime :)