Which one is better for (mysql) performance ?
“1500 (300×5) Tables with 365 rows per table” OR “(300×5)1500×365 rows in 1 table” ?
(I will get the data(s) with php.)
365 -> days number of the year
- if second: I will use “date” and “x_id” to get the 1 row from (300×5)1500×365 rows.
- if first: I will use “date” and “table_name” to get 1 row from 365 rows.**
Second one.
http://datacharmer.blogspot.com/2009/03/normalization-and-smoking.html
[edited after updates to question]
In second case you can create an index on columns
(x_id,date)which will improve performance ofWHERE x_id = ? AND date = ?searches. Some ~550000 rows is not much for well indexed table.