List:General Discussion« Previous MessageNext Message »
From:Quentin Bennett Date:April 28 2006 12:10am
Subject:RE: HELP --- Slow SP
View as plain text  
[snip]

Next point is that MySQL will only make use of an index in a join or a 
where clause if ONLY that field is included in the index. If you pack 3 
fields into an index and then try to join on ONLY ONE field, the index 
can't be used. So look at your joins and where clauses and make sure 
your indexes match.

[\snip]

I think that you can use the left most columns of the index, without including the
remainder.

So a join on 
MSISDN 
or
MSIISDN and ACTIV_IMEI

may use the index (depending on whatever else is going on)

but a join on ACTIV_IMEI only or MSISDN and ACTIV_TIME won't.

Quentin




-- 
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak@stripped
website: http://www.nusconsulting.com.au

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you
are asked to respect that confidentiality and not disclose, copy or make use
of its contents. If received in error you are asked to destroy this email
and contact the sender immediately. Your assistance is appreciated.
Thread
HELP --- Slow SPHardi OK27 Apr
  • Re: HELP --- Slow SPDaniel Kasak28 Apr
  • Re: HELP --- Slow SPMartijn Tonies28 Apr
RE: HELP --- Slow SPQuentin Bennett28 Apr
  • Re: HELP --- Slow SPDaniel Kasak28 Apr
    • Re: HELP --- Slow SPHardi OK28 Apr
      • Re: HELP --- Slow SPDaniel Kasak28 Apr
RE: HELP --- Slow SPQuentin Bennett28 Apr
RE: HELP --- Slow SPQuentin Bennett1 May
  • Re: HELP --- Slow SPHardi OK3 May