Discussion: Slow RAILS testing
Afficher un message
Vieux 15/09/2007, 14h30   #8
Travis D Warlick Jr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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-----

  Réponse avec citation
 
Page generated in 0,05096 seconds with 9 queries