The "right" way to do this would be your second way, where there would be
one row per answer. I can't really grasp how the questions and answers
relate to anything else, so I'm making a lot of assumptions.
If you are concerned that this technique is too slow, because it involves
linking two tables, there is an ugly alternative. You could store all of
your answers in a single text field, with some kind of delimited format:
And then parse it in your program.
Again, I'm not sure where you are going with this.
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
> -----Original Message-----
> Sent: Monday, April 16, 2007 7:04 PM
> To: 'mysql@stripped'
> Subject: Max columns in a tabel in MyISAM storage engine
> i have table with answers to questions. Every answer is a
> column in the table. i.e.
> another option to save it would be sth like this:
> The last one is not really useable when working with large
> amounts of data, when you want to select i.e. 200 questions
> with answers it's 200*nof answers queries to get them.
> The problem with the first solution is, that MyISAM storage
> engine is limited to 2599 columns i think. So what's
> happening if i have more answers than columns available?
> Does anybody have an idea? VIEWs or GROUP_CONCAT doesn't seem
> to be an option, they are all to slow. What's the "right" way
> to store and select such information?
> Thank you very much.
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: