Tags for a read-later bookmarking app
Your task
Your read-later app saves articles people want to read later. It has 50,000 active users. A typical user has 1,500 saved articles, and the heaviest have about 20,000. Users label articles with their own tags, such as recipes or to-cite, a few tags per article.
The sidebar lists each user's tags, with how many articles carry each one. Users filter by one tag, or by several at once, meaning articles that carry all of them. The filtered list shows 50 articles at a time, newest saved first, and a page must load in under 200 ms. Users can rename a tag, or merge two tags into one, like js into javascript.
Which tables and indexes do you use? Say what a rename and a merge each change.
It covers
- Many to many
- Tag filters
- Rename merge