<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-15622618.post5511874784968590282..comments</id><updated>2008-07-16T17:27:40.664-07:00</updated><category term='EAV table'/><category term='LAMP'/><category term='drizzle'/><category term='bye'/><category term='MySQL'/><category term='blackhole'/><category term='bug'/><category term='twitter'/><category term='JOIN performance'/><category term='binary logs'/><category term='savepoint'/><category term='replication'/><category term='MyCAT'/><category term='InnoDB'/><title type='text'>Comments on Deva's MySQL / Linux blog: Performance of JOIN using columns of different num...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.dbadeva.com/feeds/5511874784968590282/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default'/><link rel='alternate' type='text/html' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html'/><author><name>Devananda vdv</name><uri>http://www.blogger.com/profile/03378341125039609409</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://bp3.blogger.com/_1iBhwYW5_GQ/SHjs0tHXaEI/AAAAAAAAABM/BIuc8KttaBU/S220/deva_vanity_2_small.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-15622618.post-4127117084713642730</id><published>2008-07-16T17:27:00.000-07:00</published><updated>2008-07-16T17:27:00.000-07:00</updated><title type='text'>Hi Devananda, &lt;br&gt;&lt;br&gt;to tell you the truth I'd ha...</title><content type='html'>Hi Devananda, &lt;BR/&gt;&lt;BR/&gt;to tell you the truth I'd have to take a close look at the source myself to get to the bottom of it. My remark concerning the DECIMAL being internally represented as a string is from recollection of a remark by Jeremy Cole some time ago (think it was Heidelberg Developer conference, september 2007)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/4127117084713642730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/4127117084713642730'/><link rel='alternate' type='text/html' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html?showComment=1216254420000#c4127117084713642730' title=''/><author><name>Roland Bouman</name><uri>http://www.blogger.com/profile/13365137747952711328</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://www.xcdsql.org/people/rbouman/roland.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html' ref='tag:blogger.com,1999:blog-15622618.post-5511874784968590282' source='http://www.blogger.com/feeds/15622618/posts/default/5511874784968590282' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-819977405'/></entry><entry><id>tag:blogger.com,1999:blog-15622618.post-311810520872645125</id><published>2008-07-12T13:24:00.000-07:00</published><updated>2008-07-12T13:24:00.000-07:00</updated><title type='text'></title><content type='html'>This comment has been removed by a blog administrator.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/311810520872645125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/311810520872645125'/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html' ref='tag:blogger.com,1999:blog-15622618.post-5511874784968590282' source='http://www.blogger.com/feeds/15622618/posts/default/5511874784968590282' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.contentRemoved' value='true'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1416297169'/></entry><entry><id>tag:blogger.com,1999:blog-15622618.post-697880643166328839</id><published>2008-07-12T10:35:00.000-07:00</published><updated>2008-07-12T10:35:00.000-07:00</updated><title type='text'>Roland,&lt;br&gt;&lt;br&gt;Thanks for the encouragement :)&lt;br&gt;...</title><content type='html'>Roland,&lt;BR/&gt;&lt;BR/&gt;Thanks for the encouragement :)&lt;BR/&gt;&lt;BR/&gt;"I think it is because internally, DECIMAL uses a kind of string representation."&lt;BR/&gt;&lt;BR/&gt;I thought that since MySQL 5.0.3, decimal has been stored in a binary format? Is it actually just a compressed string, and not in fact numeric? Guess I should dive into the source and find out for myself :)&lt;BR/&gt;&lt;BR/&gt;Out of curiosity, I repeated the same tests joining uint:char(6) and char(6):char(6), to see how that stacks up to dec. I updated the original post with those results, but in short: &lt;BR/&gt;- char:char was 6% and 12% slower than uint:uint for the "SELECT value" and "SELECT avg(value)" tests, respectively,&lt;BR/&gt;- uint:char was 41% and 63% slower than uint:uint, respectively.&lt;BR/&gt;&lt;BR/&gt;Considering that the char:char JOIN was almost as fast as uint:uint, whereas uint:char shows a very similar performance hit to all the tests involving decimal, I wonder if mysql is performing some sort of typecast even for dec:dec JOINs?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/697880643166328839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/697880643166328839'/><link rel='alternate' type='text/html' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html?showComment=1215884100000#c697880643166328839' title=''/><author><name>Devananda vdv</name><uri>http://www.blogger.com/profile/03378341125039609409</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='26' src='http://photos1.blogger.com/img/43/7463/320/at_faria2.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html' ref='tag:blogger.com,1999:blog-15622618.post-5511874784968590282' source='http://www.blogger.com/feeds/15622618/posts/default/5511874784968590282' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-354425924'/></entry><entry><id>tag:blogger.com,1999:blog-15622618.post-7612073678571261244</id><published>2008-07-12T04:08:00.000-07:00</published><updated>2008-07-12T04:08:00.000-07:00</updated><title type='text'>Hi Devananda,&lt;br&gt;&lt;br&gt;good to see you posting again...</title><content type='html'>Hi Devananda,&lt;BR/&gt;&lt;BR/&gt;good to see you posting again :)&lt;BR/&gt;&lt;BR/&gt;"Even though decimal(13,4) is only 6 bytes, it is significantly slower to join two columns of this type than two bigint columns. I wonder why...."&lt;BR/&gt;&lt;BR/&gt;I think it is because internally, DECIMAL uses a kind of string representation. My guess is that this makes comparisons by numerical value slow.&lt;BR/&gt;&lt;BR/&gt;I think your results clearly show that even joining on identical DECIMAL types it a good deal slower than over integers.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/7612073678571261244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/15622618/5511874784968590282/comments/default/7612073678571261244'/><link rel='alternate' type='text/html' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html?showComment=1215860880000#c7612073678571261244' title=''/><author><name>Roland Bouman</name><uri>http://www.blogger.com/profile/13365137747952711328</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://www.xcdsql.org/people/rbouman/roland.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.dbadeva.com/2008/07/performance-of-join-using-columns-of.html' ref='tag:blogger.com,1999:blog-15622618.post-5511874784968590282' source='http://www.blogger.com/feeds/15622618/posts/default/5511874784968590282' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-819977405'/></entry></feed>
