
To generate performance data, we insert randomly generated objects into a bag and then query for them using various methods. Each object contains: (1) a "color" field randomly selected from 10 color names, (2) a "phase" field selected from the integers 1-4, (3) a "score" field randomly generated by a double precision number between 0.0 and 1.0, and (4) a "description" field composed of 200-450 characters of random text.
For each combination of query parameters, we run 20 iterations. On each iteration, we randomly select the constraint values and a limit of either 5, 10, or 20."range" constraints are selected with a min and a max randomly selected between 0.0 and 1.0. "in" constraints are selected with 2-5 random values.
| number of objects in bag | 'color' constraint | 'score' constraint | mean duration(ms) |
|---|---|---|---|
| 10000 | none | none | 6 |
| 10000 | none | range | 16 |
| 10000 | none | sort | 10 |
| 10000 | is | none | 5 |
| 10000 | is | range | 12 |
| 10000 | is | sort | 60 |
| 10000 | in | none | 5 |
| 10000 | in | range | 10 |
| 10000 | in | sort | 50 |
| 10000 | sort | none | 7 |
| 10000 | sort | range | 17 |
| 100000 | none | none | 8 |
| 100000 | none | range | 10 |
| 100000 | none | sort | 7 |
| 100000 | is | none | 6 |
| 100000 | is | range | 10 |
| 100000 | is | sort | 67 |
| 100000 | in | none | 4 |
| 100000 | in | range | 10 |
| 100000 | in | sort | 38 |
| 100000 | sort | none | 6 |
| 100000 | sort | range | 13 |
| 1000000 | none | none | 7 |
| 1000000 | none | range | 1217 |
| 1000000 | none | sort | 35 |
| 1000000 | is | none | 11 |
| 1000000 | is | range | 541 |
| 1000000 | is | sort | 485 |
| 1000000 | in | none | 6 |
| 1000000 | in | range | 327 |
| 1000000 | in | sort | 144 |
| 1000000 | sort | none | 6 |
| 1000000 | sort | range | 147 |