I always wondered in this situation:
var topFiveSongs = low('songs')
.where({published: true})
.sortBy('views')
.first(5)
.value();
If any db engines figure when the dataset is really large and the limit is really small (no idea what the cutoff would be), if instead of sorting and giving the first five, it instead just looks for the 5 largest/smallest. Anyone have any idea on this?