List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:July 2 1999 5:13pm
Subject:RE: Yet Another Optimization Question
View as plain text  
>>>>> "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.

For example:

In the following cases keys will be used:

col1	      col2
mediumint(x)  mediumint(y)
CHAR(x)	      VARCHAR(x)
double(x,y)   double(x1,y2)


In the following cases keys will not be used:

col1	      col2
int(x) 	      mediumint(y)
CHAR(x)	      VARCHAR(y)	(where x != y)

Regards,
Monty

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.
Thread
adding data is slowJon Drukman24 Jun
  • Re: adding data is slowSasha Pachev24 Jun
    • Re: adding data is slowJon Drukman25 Jun
      • Re: adding data is slowBenjamin Pflugmann25 Jun
        • Re: adding data is slowJon Drukman25 Jun
        • Yet Another Optimization QuestionJon Drukman28 Jun
  • Re: adding data is slowDaniel Koch25 Jun
  • adding data is slowMichael Widenius29 Jun
Re: Yet Another Optimization QuestionKevin Smith29 Jun
Re: Yet Another Optimization QuestionJon Drukman29 Jun
  • Re: Yet Another Optimization QuestionBenjamin Pflugmann30 Jun
    • Re: Yet Another Optimization QuestionJon Drukman30 Jun
Re: Yet Another Optimization QuestionKevin Smith29 Jun
Re: Yet Another Optimization QuestionJon Drukman29 Jun
  • Re: Yet Another Optimization QuestionT├Ánu Samuel29 Jun
    • Re: Yet Another Optimization QuestionJon Drukman29 Jun
      • Re: Yet Another Optimization QuestionMichael Widenius30 Jun
        • Re: Yet Another Optimization QuestionJon Drukman30 Jun
RE: Yet Another Optimization QuestionNigel Parker30 Jun
  • RE: Yet Another Optimization QuestionMichael Widenius30 Jun
Re: Yet Another Optimization Question(David Sklar)1 Jul
RE: Yet Another Optimization Questiontony2 Jul
  • RE: Yet Another Optimization QuestionMichael Widenius2 Jul
  • slow joinsJon Drukman7 Oct