>>>>> "tony" == tony <tony@stripped> writes:
>> This is the main reason why it's slow; The current MySQL can't yet
>> optimize queries where columns are stored differently.
tony> How 'different' do the tables have to be?
tony> is customerid mediumint(9) different from customerid mediumint(8)?
tony> or itemid varchar(13) different from itemid char(13)?
The key word is 'stored'. In other words; It's is not depending on
the display length.
In the following cases keys will be used:
In the following cases keys will not be used:
CHAR(x) VARCHAR(y) (where x != y)
PS: This will be fixed in MySQL 3.23.x at the same time we add support
for NULL in keys and keys on BLOBs.