We are using MongoDB for our storage. We have a collection like the folowing.
collection{
{
"_id" : ObjectId("....."),
"dataCriacao" : ISODate("..."),
"ativo" : true,
"title" : "tile",
"text" : "text",
"badge" : 0,
"pedidoId" : null,
"userID" : null,
"createdByAdmin" : true
}
{
"_id" : ObjectId("..."),
"dataCriacao" : ISODate("..."),
"ativo" : true,
"title" : null,
"text" : null,
"badge" : 0,
"pedidoId" : "2",
"userID" : "6098821",
"createdByAdmin" : false
}}
The collection is expected to get quite big and i will often query it depending on createdByAdmin. In this situation is it worth it to add an index on this field? My boss told me to but everything I found online is against indexes on boolean fields.