List:MySQL on Win32« Previous MessageNext Message »
From:John McQuillen Date:July 23 2004 12:20am
Subject:Left Join slow on Windows
View as plain text  
Hi all,

I am experiencing problems with a query which is slow (16sec) on Windows
but not on Linux (2sec).

The query looks like this:

select distinct(farm_id),
enterprise.*,enterprise_type.*,enterprise_pcode.* from enterprise left
join enterprise_pcode on (enterprise.pcode = enterprise_pcode.pcode)
left join enterprise_type on (enterprise.enterprise_type_id =
enterprise_type.enterprise_type_id) where zone like "%1b%";

The Windows server hosting the database is Windows 2003 server with
Pentium 4 2.8GHz and 2GB Memory. The query returns 1823 rows in 16.46
seconds

I have tried the same query with the same data on my Linux laptop
(Pentium 4 3.06GHz, 512MB RAM) and it returns 1823 rows in 2.06 seconds.

Can anyone suggest why the query would be so slow on Windows, and
perhaps recommend a solution? I am having problems with PHP timing out
before it can display the results of this particular query.

Regards,

John...

Thread
Left Join slow on WindowsJohn McQuillen23 Jul
  • Re: Left Join slow on WindowsPetr Vileta23 Jul
    • Re: Left Join slow on WindowsJohn McQuillen23 Jul
      • Re: Left Join slow on WindowsSGreen23 Jul
  • how to find duplicated entries within a table?Gerhard Brauckmann5 Aug
AW: how to find duplicated entries within a table?Gerhard Brauckmann5 Aug
RE: how to find duplicated entries within a table?Cesar Vega5 Aug