Hacker News new | ask | show | jobs
by gcarre 5123 days ago
"MySQL Partitioning. We decided against it because it seemed likely that it wouldn’t be much faster than our current solution."

What if you partition by HASH(user_id) instead of partitioning by month (http://dev.mysql.com/doc/refman/5.5/en/partitioning-hash.htm...)?

1 comments

(another Causes engineer here) HASH partitioning could make sense if our queries were primarily filtering on e.g. user_id, but that isn't the case here. Instead we are often querying against one or both of two columns: user_id and action_id. Partitioning by timestamp allows us to ignore partitions older than the user and/or action's creation dates.