skip to Main Content

Mongodb – How to index a mongo complex query

I really don't understand how to improve the performance of my query using index. db.Vendite.aggregate([{$group: { _id: { anno: "$anno", mese: "$mese", cod_age: "$cod_age", cod_int: "$cod_int", cod_cli: "$cod_cli", cod_linea_comm: "$cod_linea_comm", cod_sett_comm: "$cod_sett_comm", _art: "$cod_art"}, vendite_quantita: { $sum: { $add: […

VIEW QUESTION

Mongodb – Insert big json file into a mongo collection using mongosh

I need to insert a 181 KB json file into a mongo collection, the restriction is that it needs to be done using mongosh. json_file_path=/some/path/file.json json_file_string=$(cat $json_file_path) /mongo/path/monhosh $databaseName --tlsCertificateKeyFile someAuthDetails --tlsCAFile someMoreAuthDetails --quiet --eval "db.test_collection.insertOne(${json_file_string})" this seems to be…

VIEW QUESTION
Back To Top
Search