Octavian Rasnita wrote:
> I have tried, but with no difference.
> I have changed some indexes and made the queries run faster, but I still found a
> I use a module that does paging and it makes a select(*) and this query takes a very
> long time.
> I have also tried to do select(id) where the id column is the primary key, but it
> runs very slow also.
> I have also seen that select(*) with various where conditions is still very slow.
> Is there any trick to make the select(*) queries run faster within an InnoDB table?
You should accept the fact that 5.1 has improvements over 5.0, some of
them being better optimization resulting in faster execution.
Upgrade the 5.0 installation to 5.1 to profit from the newer version.
> ----- Original Message -----
> From: John Daisley
> To: Octavian Rasnita
> Cc: mysql@stripped
> Sent: Wednesday, June 23, 2010 3:55 PM
> Subject: Re: Differences between 2 MySQL instances
> Have you tried running 'OPTIMIZE TABLE' on the tables in question to make sure
> statistics are up to date.
> I would expect the vast majority of queries to run faster on MySQL 5.1 (with
> identical settings, hardware and operating system).
> 2010/6/23 Octavian Rasnita <octavian.rasnita@stripped>
> I have the following table under MySQL 5.1.43-community under Windows, and under
> MySQL 5.0.82sp1 Source distribution under Linux):
> Do you have any idea why this works differently under Linux? Is it because under
> Linux I have MySQL 5.0 and under Windows MySQL 5.1 and I definitely need to upgrade?
The MySQL code is identical on all platforms, except where platform
differences affect the code.
(Prominent example for such a difference: The Windows file system
doesn't differ between small and capital letters in a name.)
Assuming the same version on two different platforms, with the same data
and indexes, MySQL will use the same execution strategy.
If in addition the various settings are identical (especially cache
sizes), and the current usage of caches doesn't differ, you should not
see any other difference than what is caused by different CPU and disk
speeds, RAM size, machine load, 32 vs 64 bit differences, and such factors.
The real differences are between versions - improvements and bug fixes.
In addition to general improvements, you should remember that 5.0 is not
actively maintained any more, so even if significant bugs should be
found you cannot rely on getting fixes for them.
Change to a version that receives updates, currently that is 5.1
(or 5.5, but that is not yet declared "production").
Joerg Bruehe, MySQL Build Team, Joerg.Bruehe@stripped
Sun Microsystems GmbH, Komturstrasse 18a, D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028