Splitting tables by field to optimize MySQL?
Posted
by AK
on Stack Overflow
See other posts from Stack Overflow
or by AK
Published on 2010-03-23T16:46:45Z
Indexed on
2010/03/23
17:03 UTC
Read the original article
Hit count: 262
mysql
|optimization
Do splitting fields into multiple tables ever yield faster queries? Consider the following two scenarios:
Table1
-----------
int PersonID
text Value1
float Value2
or
Table1
-----------
int PersonID
text Value1
Table2
-----------
int PersonID
float Value2
If Value1 and Value2 are always being displayed together, I imagine Table1 is always faster because the second schema would require two SELECT statements.
But are there any situations where you would choose the second? If the number of records were expected to be really large?
© Stack Overflow or respective owner