Monday, March 9, 2009

Normalization of big tables by user

Consider web application, processing User requests.

Generally Users is a table in such an application.

Other tables, that contain data releavent to the User (like personal user's posts, mail, financial transactions, e.t.c. ) , generally contain ID of such a user.

When we partition such tables by User ID, we can achieve performance by following parameters:

- Fast drop (or move to archive) user, and users data.
- If there are only several users at the moment on site, we can fill memory cache by only "logged in" users data, and process than this data also only in cache.
- More space, Faster user queries by removing indexes, and processing only data releavant to the user at the moment.

No comments: