Good point.
For my particular application I rarely get more than one or two $where keys, and most of them match less than 1% of the full data set, but for other uses I'm sure it would pay off to use a reference to an array of key/value pairs so the match order could be optimized.
Time flies when you don't know what you're doing
In reply to Re^4: On optimizing nested loops
by FloydATC
in thread On optimizing nested loops
by FloydATC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |