Design of the table
Posted: Sun Sep 05, 2004 11:12 pm
hi,
does anyone know if the size of column in a table will affect the database performance?
for example, if i need to keep track of the status of the machines for 365 days every year. The table can be
+-------+--------+--------+
|machin| day| year|
+-------+--------+--------+
And, I have 365 rows for each machines yearly. If i have 500 machines to manage, i will have 183k rows every year.
Should i create the table in another like this...
+-------+--------+--------+-------+--------+-- ------+-------+--------+
|machin| year| day1| day2| day3| ... ...|day364|day365|
+-------+--------+--------+-------+--------+-- ------+-------+--------+
A single row to represent a machine yearly. So, I will only have 500 rows to manage every year.
What are the pros and cons of each of the tables?
does anyone know if the size of column in a table will affect the database performance?
for example, if i need to keep track of the status of the machines for 365 days every year. The table can be
+-------+--------+--------+
|machin| day| year|
+-------+--------+--------+
And, I have 365 rows for each machines yearly. If i have 500 machines to manage, i will have 183k rows every year.
Should i create the table in another like this...
+-------+--------+--------+-------+--------+-- ------+-------+--------+
|machin| year| day1| day2| day3| ... ...|day364|day365|
+-------+--------+--------+-------+--------+-- ------+-------+--------+
A single row to represent a machine yearly. So, I will only have 500 rows to manage every year.
What are the pros and cons of each of the tables?