[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Sending data" status


You are joining 5 tables with an OR on only two relations.
Give it a year !!

Surat Singh Bhati wrote:
> 
> If I run the following query , mysql server process hangs forever and
> it shows the "Sending data" status.
> 
>       select Count(*) from
> Registration,Candidates,CompanyJobs,Resumes,CandQual
>       where
>       CompanyJobs.qualcode=Candidates.qualcode
>       or CompanyJobs.qualcode=CandQual.qualcode
> 
> Below the explain:
> 
>       EXPLAIN
>       select Count(*) from
> Registration,Candidates,CompanyJobs,Resumes,CandQual
>       where
>       CompanyJobs.qualcode=Candidates.qualcode
>       or CompanyJobs.qualcode=CandQual.qualcode LIMIT 0, 30
> 
> 
> table           type    possible_keys key     key_len ref rows Extra
> Registration    index                   RIMARY  8         5056  Using index
> Resumes         index                   SpCode  2         5087  Using index
> CompanyJobs     ALL     Qualcode                268
> Candidates      ALL     QualCode                4718
> CandQual        ALL     Qualcode                9027            where used
> 
> Server version          3.23.33-log
> 
> My talbes having  indexed on "Qualcode" but EXPLAIN shows that it is not
> using the same.
> 
> I can run the query
>       select Count(*) from
> Registration,Candidates,CompanyJobs,Resumes,CandQual
> without where clause.
> 
> Please suggest me the solution,  I have enogh free disk and RAM.
> 
> Please reply me on my ID, I have not subscribed to the list.
> 
> Thanks
> 
> -Surat Singh Bhati
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <mysql-thread68920@xxxxxxxxxxxxxxx>
> To unsubscribe, e-mail <mysql-unsubscribe-gerald_clark=suppliersystems.com@xxxxxxxxxxxxxxx>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread69027@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.