florian writes:
> 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? > > is it better to have 800 000 rows with 21 columns or 160 000 000 rows > with 3 columns? That's 16M rows, not 160M rows, and using INT(1) makes little sense when you can save 3 bytes per value by using TINYINT(1). Anyway, I don't think I can answer your question without knowing more about what you'll do with your data. If the 20 numbers in a set will be representing different things, it makes sense to have 20 columns to save space and time, but if you're going to e.g. search for all sets that have a member greater than x, it's a pain to handle. Normally, though, I think that having 20 columns is a better way to do it, if you're going to treat those 20 values as one set, which always has the same number of members (20). //C -- Carl Troein - Círdan / Istari-PixelMagic - UIN 16353280 [EMAIL PROTECTED] | http://pixelmagic.dyndns.org/~cirdan/ Amiga user since '89, and damned proud of it too. --------------------------------------------------------------------- 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