【MongoDB】The high query operation of MongoDB(三)

1, Sort 

Needless to say, mongodb also support to sort data. THe positive one means sorting by asc order and negetive means by desc.

【MongoDB】The high query operation of MongoDB(三)

2. Group

The grammar of group:

【MongoDB】The high query operation of MongoDB(三)

Description Of Argument:

key: The field need to group 

cond: query condition 

Initial: initialize the counter of group

Redue: generally statistic operation

Finalize: further operation after group, for exampe calcuate the average. 

3.【MongoDB】The high query operation of MongoDB(三)

3. Distinct

it‘s the same as the distinct in the relational database.

【MongoDB】The high query operation of MongoDB(三)


4. page

The mongodb supports to use skip and limit to query by page.

【MongoDB】The high query operation of MongoDB(三)


5. Cursors and Cursor Methods

【MongoDB】The high query operation of MongoDB(三)


6. $query/$orderby/$explain

【MongoDB】The high query operation of MongoDB(三)


【MongoDB】The high query operation of MongoDB(三)

上一篇:Oracle集群-搭建系列-文章目录(V2014-9)


下一篇:mysql授权