Hello!
I am in the process of designing a large scale MySQL database. I
expect anywhere from 10 to 100 thousand entries in the main user
table. While that is not very many in terms of MysQL, I am still
concerned about overhead that I may be building into my application.
The main user table is necessarily large (in terms of numbers of
columns).
The problem is that my application has two components. The side that
users see only requires queries of about 5 fields from the user table.
However, there is a backend that will be scanning up to 40 user
related fields. So assuming both of these things happen equally often,
which of the two following scenarios is better: Having one large 40
column table or having one small 5 column user table and a 35 column
secondary table.
Example:
Process 1: Selecting 5 fields out of a table with 40 columns versus
selecting 5 fields out of a table of 5 entries
Process 2: Selecting 40 fields out of a table of 40 columns versus
selecting 40 fields out of a table of 5 entries joined with a table of
35 entries.
I couldn't find a straight answer to this question, and I was hoping
someone could help. =)
I am in the process of designing a large scale MySQL database. I
expect anywhere from 10 to 100 thousand entries in the main user
table. While that is not very many in terms of MysQL, I am still
concerned about overhead that I may be building into my application.
The main user table is necessarily large (in terms of numbers of
columns).
The problem is that my application has two components. The side that
users see only requires queries of about 5 fields from the user table.
However, there is a backend that will be scanning up to 40 user
related fields. So assuming both of these things happen equally often,
which of the two following scenarios is better: Having one large 40
column table or having one small 5 column user table and a 35 column
secondary table.
Example:
Process 1: Selecting 5 fields out of a table with 40 columns versus
selecting 5 fields out of a table of 5 entries
Process 2: Selecting 40 fields out of a table of 40 columns versus
selecting 40 fields out of a table of 5 entries joined with a table of
35 entries.
I couldn't find a straight answer to this question, and I was hoping
someone could help. =)
Comment