From: Travis D Warlick Jr Date: 2007-09-15T21:30:24+09:00 Subject: Re: Slow RAILS testing -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Phlip wrote: > Travis D Warlick Jr wrote: > >> ALTER TABLE tablename TYPE=HEAP; > > Ain't that ENGINE=HEAP? Both is valid. > Gaspard Bucher wrote: > >> HEAP does not support TEXT columns... Too bad. > > Suppose one wrote a rake task db:heap_mode, to switch the test > environment DB to the faster system. Could that task programmatically > access schema.rb, find the TEXT columns, and downgrade them to long > strings? One possible rails issue: I believe the entire test database structure is erased and recreated everytime, so it couldn't be a rake task, it would have to be integrated into the test task. A database issue: you would have to beware of your table size. Every HEAP table with at least 1 VARCHAR is at least 50KB due to how the VARCHARs are stored in memory, and the larger you make your VARCHARs the larger your tables get (eg. a table with 1 field of VARCHAR(20000) gives a table size of ~170KB). If anyone wants to do this, note that the largest record size using the HEAP engine is 64KB, and the largest single VARCHAR is ~21000. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG69BFWvapaOIz2YYRAv5cAJ0Z29aPLUVD8q/coTpULjzkzMahuACfUxqy Sbr0ZNzCUHCFbrGI4FBQJMk= =6GQA -----END PGP SIGNATURE-----