<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JOIN Performance &amp; Charsets</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/10/21/join-performance-charsets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/10/21/join-performance-charsets/</link>
	<description>Percona&#039;s MySQL &#38; InnoDB performance and scalability blog</description>
	<lastBuildDate>Sat, 11 Feb 2012 16:45:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: MLBR</title>
		<link>http://www.mysqlperformanceblog.com/2008/10/21/join-performance-charsets/comment-page-1/#comment-770260</link>
		<dc:creator>MLBR</dc:creator>
		<pubDate>Thu, 29 Jul 2010 19:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=514#comment-770260</guid>
		<description>Any insight into this CHARSET perfomance issue related to ENUMs?

http://bugs.mysql.com/bug.php?id=55606</description>
		<content:encoded><![CDATA[<p>Any insight into this CHARSET perfomance issue related to ENUMs?</p>
<p><a href="http://bugs.mysql.com/bug.php?id=55606" rel="nofollow">http://bugs.mysql.com/bug.php?id=55606</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jatin Mehta</title>
		<link>http://www.mysqlperformanceblog.com/2008/10/21/join-performance-charsets/comment-page-1/#comment-742814</link>
		<dc:creator>Jatin Mehta</dc:creator>
		<pubDate>Sat, 03 Apr 2010 08:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=514#comment-742814</guid>
		<description>I have one problem with join.

I need to reduce query time to it optimized level. Details are as under

QUERY: 
SELECT SQL_CALC_FOUND_ROWS p.*, FLOOR(p.prodratingtotal/p.prodnumratings) AS prodavgrating, 0 AS prodgroupdiscount, pi.* , (IF(p.prodname=&#039;gold&#039;, 10000, 0) + IF(p.prodcode=&#039;gold&#039;, 10000, 0) + ((MATCH (ps.prodname) AGAINST (&#039;gold&#039;)) * 10) + MATCH (ps.prodname,ps.prodcode,ps.proddesc,ps.prodsearchkeywords) AGAINST (&#039;gold&#039;)) AS score FROM products p LEFT JOIN product_images pi ON (p.productid = pi.imageprodid AND pi.imageisthumb = 1) INNER JOIN product_search ps ON p.productid = ps.productid WHERE p.prodvisible = 1 AND (ps.prodcode = &#039;gold&#039; OR TRUE) AND (MATCH (ps.prodname,ps.prodcode,ps.proddesc,ps.prodsearchkeywords) AGAINST (&#039;gold&#039;)) ORDER BY score DESC LIMIT 20
EXECUTION TIME: 2.5000+ seconds
TABLES DATA:
	products: 31,000 records
	product_images: 92,000 records
	product_search: 57,000 records

EXPLAIN COMMAND WITH ABOVE QUERY:
1	SIMPLE	ps	fulltext	prodname	prodname	0 		1	Using where; Using temporary; Using filesort 
1	SIMPLE	p	eq_ref	PRIMARY,i_products_rating_vis,i_products_added_vis,i_products_sortorder_vis		PRIMARY	4	shoppingcart_5521.ps.productid	1	Using where
1	SIMPLE	pi	ref	  i_product_images_imageprodid 	i_product_images_imageprodid	5	shoppingcart_5521.p.productid,const	1</description>
		<content:encoded><![CDATA[<p>I have one problem with join.</p>
<p>I need to reduce query time to it optimized level. Details are as under</p>
<p>QUERY:<br />
SELECT SQL_CALC_FOUND_ROWS p.*, FLOOR(p.prodratingtotal/p.prodnumratings) AS prodavgrating, 0 AS prodgroupdiscount, pi.* , (IF(p.prodname=&#8217;gold&#8217;, 10000, 0) + IF(p.prodcode=&#8217;gold&#8217;, 10000, 0) + ((MATCH (ps.prodname) AGAINST (&#8216;gold&#8217;)) * 10) + MATCH (ps.prodname,ps.prodcode,ps.proddesc,ps.prodsearchkeywords) AGAINST (&#8216;gold&#8217;)) AS score FROM products p LEFT JOIN product_images pi ON (p.productid = pi.imageprodid AND pi.imageisthumb = 1) INNER JOIN product_search ps ON p.productid = ps.productid WHERE p.prodvisible = 1 AND (ps.prodcode = &#8216;gold&#8217; OR TRUE) AND (MATCH (ps.prodname,ps.prodcode,ps.proddesc,ps.prodsearchkeywords) AGAINST (&#8216;gold&#8217;)) ORDER BY score DESC LIMIT 20<br />
EXECUTION TIME: 2.5000+ seconds<br />
TABLES DATA:<br />
	products: 31,000 records<br />
	product_images: 92,000 records<br />
	product_search: 57,000 records</p>
<p>EXPLAIN COMMAND WITH ABOVE QUERY:<br />
1	SIMPLE	ps	fulltext	prodname	prodname	0 		1	Using where; Using temporary; Using filesort<br />
1	SIMPLE	p	eq_ref	PRIMARY,i_products_rating_vis,i_products_added_vis,i_products_sortorder_vis		PRIMARY	4	shoppingcart_5521.ps.productid	1	Using where<br />
1	SIMPLE	pi	ref	  i_product_images_imageprodid 	i_product_images_imageprodid	5	shoppingcart_5521.p.productid,const	1</p>
]]></content:encoded>
	</item>
</channel>
</rss>

