mongodb: field sorted by number of occurances -


i have collection each document representing virtual auction. want find common item id given time period. in sql, i'd select item, count(*) count group item , usual sorting , limits. there mongodb equivalent this?

mongodb has several options here.

each of these options have different syntax , different speed.

in of these cases, find these options relatively slow. map / reduce jobs intended run "off-line", "cron job" or "scheduled task". note if plan lot, want pre-aggregate data.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -