I am designing 2 tables.
user_table (userid username)
100K records expected
transaction_table(transactionid, date, description, userid)
5 billion records expected. Nearly 50K transactions per user is expected.
transaction_table
stores transactions done by users. This table rarely have any UPDATE
or DELETE
operations. There are significant SELECT
and INSERT
operations, but all are on the basis of userid
. So, either I am inserting a user's transaction into the table or I am returning the transactions made by a particular user.
Does partitioning transaction_table
make sense?
This is because, there will be 100K partition tables, each for 1 user. Is this good in any sense?
What other options do I have, to make INSERT
and SELECT
operations fast on transaction_table
?