At 6:14 PM -0600 7/29/01, Nelson Goforth wrote:
>I'm running into a problem in trying to create a MySQL table of 120+ fields.
>
>Perhaps there's a better way to do this, but until now I've used the 
>Terminal and (after starting MySQL etc) simply pasted my CREATE 
>statement into the MySQL command line, like:
>
>CREATE TABLE responses (
>ticket_id       VARCHAR(50)             ,
>assmt_id        SMALLINT UNSIGNED       ,
>recorded        TIMESTAMP(8)            ,
>assessing       VARCHAR(100)          ) ;
>
>and it has worked fine.  But with this large CREATE statement I find 
>the Terminal freezes up, and the, well - it used to be a beach ball 
>- but the 'wait' cursor shows up and nothing happens.  I have to 
>'Force Quit' to get out of it.
>
>What am I doing wrong here?

Umm... Asking a non-perl question on a perl mailing list?

But I'd guess that the terminal might not be 'freezing up', it's just 
taking MySQL a long time to create the table...  You could try 
opening up a separate terminal window, and doing a top or ps to see 
what's going on, or use Process Viewer for the GUI-minded....

You could try creating the table with a subset of the 120+ fields, 
and then using ALTER TABLE (or the mySQL equiv..) to add fields in 
chunks.

Or double-check the documentation for MySQL to see if somehow it has 
a limit on the number of fields in a table...

Or consider renormalizing your table into more tables with fewer fields...

-Jeff Lowrey

Reply via email to