In the last episode (Nov 17), florian said:
> i have to store a dataset of 20  elements. the data is a int(1). i
> would have about 800 000 datasets. now the question is what performs
> better with mysql?
> 
> one table like this:              or:
> 
> mytable                           mytable
> ----------                        ----------
> someId                            someId
> element1 int(1)                   elementNum int(2)
> ...                               elementValue int(1)
> element20                         ----------
> ----------
> 
> is it better to have 800 000 rows with 21 columns or 160 000 000 rows 
> with 3 columns?

The 21-column one.  Especially if every row has all 20 elements
populated.  The 2nd option is better for layouts where you want to
dynamically add or remove elements, and where each row only has a
couple of elements.

-- 
        Dan Nelson
        [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to