<?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"
	>
<channel>
	<title>Comments on: Enum Fields VS Varchar VS Int + Joined table: What is Faster?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/</link>
	<description>Everything about MySQL Performance</description>
	<pubDate>Tue, 02 Dec 2008 17:15:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: somebody</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-324239</link>
		<dc:creator>somebody</dc:creator>
		<pubDate>Mon, 07 Jul 2008 15:59:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-324239</guid>
		<description>have you guys tried indexing state_id on the cities_join table.
though I read something about frequent inserts with indexes being slow.
but would indexing speed things up?

and also

SELECT SQL_NO_CACHE c.city FROM states s LEFT JOIN cities_join c ON (s.id = c.state_id) WHERE s.name='Minnesota' LIMIT 10000,5;

since your searching by state maybe if you place it at the left mysql would search for that first and then search for the cities with similar state_id, and it will be ordered automatically.

ENUM is what got me to this blog, but since you guys said its dangerous, it's no longer in my options.</description>
		<content:encoded><![CDATA[<p>have you guys tried indexing state_id on the cities_join table.<br />
though I read something about frequent inserts with indexes being slow.<br />
but would indexing speed things up?</p>
<p>and also</p>
<p>SELECT SQL_NO_CACHE c.city FROM states s LEFT JOIN cities_join c ON (s.id = c.state_id) WHERE s.name=&#8217;Minnesota&#8217; LIMIT 10000,5;</p>
<p>since your searching by state maybe if you place it at the left mysql would search for that first and then search for the cities with similar state_id, and it will be ordered automatically.</p>
<p>ENUM is what got me to this blog, but since you guys said its dangerous, it&#8217;s no longer in my options.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hakan</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-312410</link>
		<dc:creator>Hakan</dc:creator>
		<pubDate>Wed, 11 Jun 2008 14:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-312410</guid>
		<description>Thanks for the test. 

I think using the 4th way depends on the application. On our case, we store this kind of information in TINYINT and do the work in application, as we only select 25 of them at once. But when selecting thousands of row, and making change in all of them may not be better than storing in ENUM or varchar. I'll do some tests about this when I have time and post here.</description>
		<content:encoded><![CDATA[<p>Thanks for the test. </p>
<p>I think using the 4th way depends on the application. On our case, we store this kind of information in TINYINT and do the work in application, as we only select 25 of them at once. But when selecting thousands of row, and making change in all of them may not be better than storing in ENUM or varchar. I&#8217;ll do some tests about this when I have time and post here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raymond</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-296742</link>
		<dc:creator>Raymond</dc:creator>
		<pubDate>Thu, 08 May 2008 18:52:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-296742</guid>
		<description>Thank you for these tests, it helped us find a solution to several issues before implementing.</description>
		<content:encoded><![CDATA[<p>Thank you for these tests, it helped us find a solution to several issues before implementing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: *confused*</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-283254</link>
		<dc:creator>*confused*</dc:creator>
		<pubDate>Sun, 20 Apr 2008 07:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-283254</guid>
		<description>16 bit fixed length integers vs random length strings (32 to 400 bits)

Shouldn't the enum be several orders of magnitude faster, especially on sorts? I don't understand.
Please explain to me why the benchmark shows only negligible differences.</description>
		<content:encoded><![CDATA[<p>16 bit fixed length integers vs random length strings (32 to 400 bits)</p>
<p>Shouldn&#8217;t the enum be several orders of magnitude faster, especially on sorts? I don&#8217;t understand.<br />
Please explain to me why the benchmark shows only negligible differences.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Оптимизация работы с MySQL at Всякие интересные штучки для WEB-разработчика</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-242725</link>
		<dc:creator>Оптимизация работы с MySQL at Всякие интересные штучки для WEB-разработчика</dc:creator>
		<pubDate>Fri, 15 Feb 2008 02:11:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-242725</guid>
		<description>[...] Хотя ENUM и противоречит нормальным формам, но, как показывают тесты, он быстрее других [...]</description>
		<content:encoded><![CDATA[<p>[...] Хотя ENUM и противоречит нормальным формам, но, как показывают тесты, он быстрее других [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Оптимизация работы с MySQL &#124; Записки маленького юниксоида</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-242523</link>
		<dc:creator>Оптимизация работы с MySQL &#124; Записки маленького юниксоида</dc:creator>
		<pubDate>Thu, 14 Feb 2008 12:21:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-242523</guid>
		<description>[...] Хотя ENUM и противоречит нормальным формам, но, как показывают тесты, он быстрее других [...]</description>
		<content:encoded><![CDATA[<p>[...] Хотя ENUM и противоречит нормальным формам, но, как показывают тесты, он быстрее других [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kipp</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-242000</link>
		<dc:creator>Kipp</dc:creator>
		<pubDate>Wed, 13 Feb 2008 02:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-242000</guid>
		<description>Does anyone know if/how these vary using sets. Maybe comparing set v. varchar list v. int used bitwise?</description>
		<content:encoded><![CDATA[<p>Does anyone know if/how these vary using sets. Maybe comparing set v. varchar list v. int used bitwise?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Knapp</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-235577</link>
		<dc:creator>Greg Knapp</dc:creator>
		<pubDate>Tue, 29 Jan 2008 10:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-235577</guid>
		<description>Not sure if this will have any impact on queries performance but your column definitions for state_id differ slightly between your dictionary table and cities_join table; cities_join.state_id is UNSIGNED and states.id isn't.</description>
		<content:encoded><![CDATA[<p>Not sure if this will have any impact on queries performance but your column definitions for state_id differ slightly between your dictionary table and cities_join table; cities_join.state_id is UNSIGNED and states.id isn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-235233</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Mon, 28 Jan 2008 17:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-235233</guid>
		<description>Mostafa - only if you screw up badly.

1) you need to have backups of course.
2) you better to preserve old .frm file and if you change is not successful.
3) you better test it outside of production to make sure such change works.

But you're right it is a bit dangerous :)</description>
		<content:encoded><![CDATA[<p>Mostafa - only if you screw up badly.</p>
<p>1) you need to have backups of course.<br />
2) you better to preserve old .frm file and if you change is not successful.<br />
3) you better test it outside of production to make sure such change works.</p>
<p>But you&#8217;re right it is a bit dangerous <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mostafa</title>
		<link>http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-234853</link>
		<dc:creator>mostafa</dc:creator>
		<pubDate>Sun, 27 Jan 2008 14:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2008/01/24/enum-fields-vs-varchar-vs-int-joined-table-what-is-faster/#comment-234853</guid>
		<description>but if we make mistake in updating(include add,change,del) a field of enum type may be we lost data and it is awful</description>
		<content:encoded><![CDATA[<p>but if we make mistake in updating(include add,change,del) a field of enum type may be we lost data and it is awful</p>
]]></content:encoded>
	</item>
</channel>
</rss>
