top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Which type of indexing should I choose for boolean field in MongoDB?

0 votes
282 views

We all know that mongoDB provide different type of indexing (ascending, descending, geo2D, geo2d sphere, or text), so which type of indexing considered more efficient for indexing boolean field?

posted Jan 5, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

I want to list the size of the different database and trying the function:

db.stats()

But, my developer team is worried over that this might have a huge impact of the system. Should I be worried?

How does this function detect the statistic information such as the size of the different databases. Or is it a better way to detect the size of the database that I can use, which has little or no performance impact ..

0 votes

I want compress the data stored in column more efficient, because mydata is timeseries of stock or future price.
Most of them is similar, so I thought I could compress the price data(float, uint64, int) more efficient than zlib,like what infobright do.

Could any one tell me how to compress the column more efficient or could I get the blocks data type when I write the compress plug.

+1 vote

I am going to build a application for booking any type of resource. (Hotel, movie tickets,doctors,etc..) Any thing bookable. My initial plan was use MongoDB for back end. My idea is keep common data set in a different collection and put reference to base collection dataset like SQL. Below is a sample of that data set.

resources collection
{
_id:100,
name : standard room,
},
{
_id:101,
name : VIP room,
},
{
_id:102,
name : double room,
},

base data collection
{
_id:300,
name : ABC Hotel,
resources:[_id:100,101,102]
address :xxxxx
}

So this type of data set need joins when user requesting hotel details. Is that good practice?
I want to keep the document for each resources. But it duplicate the same data. And also we need to filter the data with already booked once as well as on going transactions. So need to keep connection with transaction collection as well.

I want to know how I will use properly.

...