Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Test case: 4.1.3 much slower than 4.0.20d: msg#00011

db.mysql.bugs

Subject: Re: Test case: 4.1.3 much slower than 4.0.20d

Hello,

thanks a lot, you are absolutely right after analyze
speed is much much better. Now I can start to use/test 4.1 for our
development apps. :)

--
Saulius

Sergei Golubchik wrote:

Hi!

On Jul 12, SaGu wrote:

Hello,

on ftp://ftp.mysql.com/pub/mysql/upload/ please find
file perf_test_case.rar (performance test case).

Within RAR archive there are two files:

- perf_test_data.sql.gz -- test case's data (~105M of data)
- perf_test_query.sql -- test case's query

Test have been done on Windows with 4.0.20d and 4.1.3-beta mysql
version servers.

Query results:

4.0.20d - ~0.14s
4.1.3 - ~10.61s ( ~ 43 times slower ! )

Hope it could be useful if such results is caused by a bug.


No, it's not a bug (though it took me quite a while to figure it out :)

It's a new feature that exposed a problem in your application.

Check EXPLAIN output - in 4.0 e* tables are accessed by "ref" join
method (like in indexed_column=some_value)
while in 4.1 it's "ref_or_null" (like in indexed_column=some_value OR
indexed_column IS NULL). MySQL-4.0 was not able to use indexes for the
latter expression, "ref_or_null" was implemented in 4.1.

The second plan in fact looks better - number of rows accessed by
"ref_or_null" is less that the number of rows in 4.0 accessed with "ref".
But in fact the plan in 4.1 is ~40 times slower - so something must be
wrong with the cost estimation.

And this is your problem - tables are not analyzed, so MySQL cannot get
any meaningful estimates about number of rows. After doing ANALYZE TABLE
for all your tables, the query is very fast in 4.1 too.

Regards,
Sergei


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation