On 8 Jul 2002, at 16:07, Arul <[EMAIL PROTECTED]> wrote:

>   FROM
>             User_Type_Details UTD,
>             User_Type_Details B , Users U ,TempGeneralSearch1 T1,Users
>             A LEFT JOIN Company C on (U.CompanyID = C.CompanyID) LEFT
>             JOIN Expert_Info EI on (U.UserID = EI.UserID) LEFT JOIN
>             User_Horizontal_Market UHM on (U.UserID = UHM.UserID) LEFT
>             JOIN Industry I on (U.IndustryID = I.IndustryID) LEFT JOIN
>             Technology_Area T  on (U.Technology_AreaID =
>             T.Technology_AreaID) LEFT JOIN Role R on (U.RoleID =
>             R.RoleID )
>   WHERE
>             U.UserID = UTD.UserID
>             AND  U.User_Status='ACT' AND  U.User_App_Status='APP' AND
>             UTD.User_TypeID IN (4,0,2,3)   AND T1.TempID=117

You seem to have some tables in the FROM part of your query that 
aren't being used (Users aliased to A, User_Type_Details aliased to 
B) and another that isn't joined to anything (T1, but that may be 
okay since it looks like you may be getting only one record from it 
because of the TempID=117).  Eliminate the unused tables (which could 
be resulting in a huge number of duplicated records), and your speed 
should improve greatly.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org

---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to