This is very nice, another way is to do the partition in the query yourself by using different databases/tables based on eg. a hashed userid. This works well and cross-platform if you have very isolated data for inserts/deletes/indexes (KISS). But this solution seems neat, I'm pretty sure it will solve someones problem.