RE: MySQL 5 problem after upgrade

2006-05-27 Thread Moritz Möller
Hi,

i've noticed similar behaviour as we upgraded to mysql 5.0.


The query optimizer seems to been "optimized" a little too much :-\



-Original Message-
From: Szymon Kosok [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 27, 2006 5:42 PM
Cc: mysql@lists.mysql.com
Subject: Re: MySQL 5 problem after upgrade

Hello again,

> SELECT shout_avatar, shout_own, timestamp, tekst, imie, pseudo, wiek,
> City, Country, plec, wlosy_kol, gra_gwiazdy.id, gra_gm.gid AS gm FROM
> gra_shoutbox INNER JOIN (gra_gwiazdy) ON (gra_gwiazdy.id =
> gra_shoutbox.gid) INNER JOIN (swiat_miasta) ON (swiat_miasta.CityId =
> gra_gwiazdy.miastoid) INNER JOIN (swiat_panstwa) ON
> (swiat_panstwa.CountryId = gra_gwiazdy.countryid) INNER JOIN (gra_gm) ON
> (gra_gm.gid = gra_gwiazdy.id) WHERE gra_gwiazdy.id != '1310' ORDER BY
> gra_shoutbox.id DESC LIMIT 0, 10;
>   

It was problem with query. MySQL uses filesort, and that was cause. I've
deleted WHERE clause and now execution time is 100 times faster. (with
WHERE about 3 sec, without 0,03 sec. ;-)) In other way, strange is that
there wasn't any problem in 4.1.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL 5 problem after upgrade

2006-05-27 Thread Szymon Kosok

Hello again,


SELECT shout_avatar, shout_own, timestamp, tekst, imie, pseudo, wiek,
City, Country, plec, wlosy_kol, gra_gwiazdy.id, gra_gm.gid AS gm FROM
gra_shoutbox INNER JOIN (gra_gwiazdy) ON (gra_gwiazdy.id =
gra_shoutbox.gid) INNER JOIN (swiat_miasta) ON (swiat_miasta.CityId =
gra_gwiazdy.miastoid) INNER JOIN (swiat_panstwa) ON
(swiat_panstwa.CountryId = gra_gwiazdy.countryid) INNER JOIN (gra_gm) ON
(gra_gm.gid = gra_gwiazdy.id) WHERE gra_gwiazdy.id != '1310' ORDER BY
gra_shoutbox.id DESC LIMIT 0, 10;
  


It was problem with query. MySQL uses filesort, and that was cause. I've
deleted WHERE clause and now execution time is 100 times faster. (with
WHERE about 3 sec, without 0,03 sec. ;-)) In other way, strange is that
there wasn't any problem in 4.1.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]