[drupal-devel] MySQL ENUM vs. TINYINT (possible performance boost?)

Robert Douglass rob at robshouse.net
Sat Oct 15 21:26:16 UTC 2005

And the other, bigger, question is; where does this leave PostgreSQL 

Angie Byron wrote:
> I was dinking around in PHPMyAdmin today and noticed this thing called 
> "Propose table structure" which runs:
> FROM `tablename`
> ...and attempts to discover the most optimal fieldtype for each field, 
> based on the data it's currently storing.
> You'll notice there are ENUMs just about everywhere. And a lot of its 
> output is largely irrelevant. For example, in the watchdog table it 
> recommends as the hostname field:
> Which obviously would not be good. :P
> However, we do have a lot of TINYINT fields that are only ever going to 
> store either 0 or 1, which could be changed to ENUM('0','1') NOT NULL as 
> the analyzer recommends.
> Any MySQL gurus who could shed some more light on this? Is it worth 
> doing? Would we gain any performance benefit from this or would it be 
> too negligible to notice?

More information about the drupal-devel mailing list