I have two tables in MySQL
TableA
Col1
Col2
Col3
TableB
Col1
Col4
Col5
The relationship between TableA and TableB is 1:M
table A will have approx 10,000 rows while tableB will have approx 100,000 rows.
I must select a row from TableB that is satisfies a complex condition and Col3 of TableA (parent table) also satisfies some condition.
Which will give me better performance:
1) keep tables normalized, use a join to check the condition
2) store Col3 in TableB as well and update all rows in TableB if the value of Col3 changes in TableA.
There have to be approx 500,000 SELECT queries run on the database daily. Ideally the value of the Col3 should change after each select query but I can postpone that till approx 10,000 queries after which I must update Col3.