<?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: How to understand key length limitations in MySQL</title>
	<atom:link href="http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:56:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: mark</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-19137</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 10 Feb 2011 16:31:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-19137</guid>
		<description>I understand perfectly well how keys are used in database systems, and if I choose to design my system with a long key for a good reason, that is my tradeoff to make.

Perhaps using long keys will slow down mysql relative to an unindexed table; if so, they should look at how sqlite does it -- it works quite well, even in a 150 GB (hundred fifty gigabyte) database.</description>
		<content:encoded><![CDATA[<p>I understand perfectly well how keys are used in database systems, and if I choose to design my system with a long key for a good reason, that is my tradeoff to make.</p>
<p>Perhaps using long keys will slow down mysql relative to an unindexed table; if so, they should look at how sqlite does it &#8212; it works quite well, even in a 150 GB (hundred fifty gigabyte) database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-18088</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Tue, 30 Mar 2010 11:10:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-18088</guid>
		<description>what could be minimum length could be used for the sake of optimization too? field(2) or field(10), which would be fast and optimized for search?</description>
		<content:encoded><![CDATA[<p>what could be minimum length could be used for the sake of optimization too? field(2) or field(10), which would be fast and optimized for search?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J0NES</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-18025</link>
		<dc:creator>J0NES</dc:creator>
		<pubDate>Mon, 15 Mar 2010 09:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-18025</guid>
		<description>annotation to my previous post: the citation markup I did not work - citation ends with &quot;how keys are used in
database management systems.&quot; - the following rant is by me.</description>
		<content:encoded><![CDATA[<p>annotation to my previous post: the citation markup I did not work &#8211; citation ends with &#8220;how keys are used in<br />
database management systems.&#8221; &#8211; the following rant is by me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J0NES</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-18024</link>
		<dc:creator>J0NES</dc:creator>
		<pubDate>Mon, 15 Mar 2010 09:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-18024</guid>
		<description>Dear Author, Dear Readers,

the best link to understand to what happened here is
http://bugs.mysql.com/bug.php?id=4541

you have to scroll down to the bottom to the last post by Jason Urrich: 

&lt;cite&gt;

------------------------------------
TO ANYONE WHO RUNS INTO THIS PROBLEM
------------------------------------

Before trying to work around this problem, consider what this error is telling you: you
are trying to set up a key (i.e., a tree searching index) that needs more than a certain
number of bytes. If you are getting this error for something that you&#039;ve marked as a
primary key and your keylength is over 20 bytes (latin1) or 60 bytes (utf8), then stop
right and go back to your design - this is not a suitable primary key.

If you are running into this problem for a non-primary key or an indexed column, the
problem comes down to the same thing: you&#039;re trying to use an enormously long string to
do tree index lookup, which means you&#039;ve probably not understood how keys are used in
database management systems.

&lt;/cite&gt; 

Of course most of the Webapps, especially php based, will break, if they really need utf8 - so the result of this stupid design decision is that in 2010 you still can not have full utf-8 support with mysql - instead you are faced with arrogant &quot;you do not know how to use indexes&quot; statements of the devs and they want you to look like the idiot - totally ridicolous. 

My serious advise for 2010, considering not only the never ending line of stupid mysql bugs, but also the general situation for this piece of software: move your apps either to postgres or, if web only, to one of the upcoming nosql databases like e.g. couchdb - it is time for mysql to die, and you will be lost on a sinking ship.</description>
		<content:encoded><![CDATA[<p>Dear Author, Dear Readers,</p>
<p>the best link to understand to what happened here is<br />
<a href="http://bugs.mysql.com/bug.php?id=4541" rel="nofollow">http://bugs.mysql.com/bug.php?id=4541</a></p>
<p>you have to scroll down to the bottom to the last post by Jason Urrich: </p>
<p><cite></cite></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
TO ANYONE WHO RUNS INTO THIS PROBLEM<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Before trying to work around this problem, consider what this error is telling you: you<br />
are trying to set up a key (i.e., a tree searching index) that needs more than a certain<br />
number of bytes. If you are getting this error for something that you&#8217;ve marked as a<br />
primary key and your keylength is over 20 bytes (latin1) or 60 bytes (utf8), then stop<br />
right and go back to your design &#8211; this is not a suitable primary key.</p>
<p>If you are running into this problem for a non-primary key or an indexed column, the<br />
problem comes down to the same thing: you&#8217;re trying to use an enormously long string to<br />
do tree index lookup, which means you&#8217;ve probably not understood how keys are used in<br />
database management systems.</p>
<p> </p>
<p>Of course most of the Webapps, especially php based, will break, if they really need utf8 &#8211; so the result of this stupid design decision is that in 2010 you still can not have full utf-8 support with mysql &#8211; instead you are faced with arrogant &#8220;you do not know how to use indexes&#8221; statements of the devs and they want you to look like the idiot &#8211; totally ridicolous. </p>
<p>My serious advise for 2010, considering not only the never ending line of stupid mysql bugs, but also the general situation for this piece of software: move your apps either to postgres or, if web only, to one of the upcoming nosql databases like e.g. couchdb &#8211; it is time for mysql to die, and you will be lost on a sinking ship.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohinish</title>
		<link>http://www.xaprb.com/blog/2006/04/17/max-key-length-in-mysql/#comment-17940</link>
		<dc:creator>Mohinish</dc:creator>
		<pubDate>Thu, 04 Mar 2010 19:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=129#comment-17940</guid>
		<description>Nice Article.
However, the workaround can be like this:

create table test(c varchar(250), d varchar(250), primary key(`c`(100),`d`(100));

You can choose only the first few to index.</description>
		<content:encoded><![CDATA[<p>Nice Article.<br />
However, the workaround can be like this:</p>
<p>create table test(c varchar(250), d varchar(250), primary key(`c`(100),`d`(100));</p>
<p>You can choose only the first few to index.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

