<?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: The Trouble with Keys</title>
	<atom:link href="http://www.brentozar.com/archive/2012/09/trouble-keys/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brentozar.com/archive/2012/09/trouble-keys/</link>
	<description></description>
	<lastBuildDate>Fri, 24 May 2013 20:42:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52831</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Fri, 19 Oct 2012 13:26:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52831</guid>
		<description><![CDATA[1) I don&#039;t know anything about MySQL. The &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html#function_uuid-short&quot; rel=&quot;nofollow&quot;&gt;fantastic manual&lt;/a&gt; explains exactly how this code works. I&#039;d be worried that under heavy load the database will become the bottleneck.
2) Correct. As long as you aren&#039;t hard coding however you identify a machine, you are safe in a virtualized/cloud environment.]]></description>
		<content:encoded><![CDATA[<p>1) I don&#8217;t know anything about MySQL. The <a href="http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html#function_uuid-short" rel="nofollow">fantastic manual</a> explains exactly how this code works. I&#8217;d be worried that under heavy load the database will become the bottleneck.<br />
2) Correct. As long as you aren&#8217;t hard coding however you identify a machine, you are safe in a virtualized/cloud environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idan</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52830</link>
		<dc:creator>Idan</dc:creator>
		<pubDate>Fri, 19 Oct 2012 10:21:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52830</guid>
		<description><![CDATA[1) What the difference between Rustlakes and UUID_SHORT() function in MySQL?

2) IS the code is good when running on Amazon EC2? ,what happens when I relaunch a server stop/start, I get a new machine, does it matter or it&#039;s ok, because the Mac address will change
&#039;
Thanks]]></description>
		<content:encoded><![CDATA[<p>1) What the difference between Rustlakes and UUID_SHORT() function in MySQL?</p>
<p>2) IS the code is good when running on Amazon EC2? ,what happens when I relaunch a server stop/start, I get a new machine, does it matter or it&#8217;s ok, because the Mac address will change<br />
&#8216;<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52829</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Fri, 19 Oct 2012 01:31:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52829</guid>
		<description><![CDATA[There&#039;s definitely a possibility of collisions; clock drift is a very real and nasty thing. In RustFlakes I throw an ApplicationException when it&#039;s detected that &lt;a href=&quot;https://github.com/peschkaj/rustflakes/blob/master/RustFlakes/Oxidation.cs#L78&quot; rel=&quot;nofollow&quot;&gt;the clock is running backwards&lt;/a&gt;.

In addition to checking with code, it&#039;s best to elect one local server as the NTP server and have all other key generating servers sync with the time master. It&#039;s a difficult problem, but not attempting to solve it results in some potentially nasty scenarios.]]></description>
		<content:encoded><![CDATA[<p>There&#8217;s definitely a possibility of collisions; clock drift is a very real and nasty thing. In RustFlakes I throw an ApplicationException when it&#8217;s detected that <a href="https://github.com/peschkaj/rustflakes/blob/master/RustFlakes/Oxidation.cs#L78" rel="nofollow">the clock is running backwards</a>.</p>
<p>In addition to checking with code, it&#8217;s best to elect one local server as the NTP server and have all other key generating servers sync with the time master. It&#8217;s a difficult problem, but not attempting to solve it results in some potentially nasty scenarios.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idan</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52828</link>
		<dc:creator>Idan</dc:creator>
		<pubDate>Fri, 19 Oct 2012 00:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52828</guid>
		<description><![CDATA[Why does the time of the server is set backwards? 

Scalability most important here and with AI I just can&#039;t see how my DB scales. Many companies use this method produce sequenced keys. IF you have any other good idea how to generate sequence keys without the internal clock please.. suggest something better.]]></description>
		<content:encoded><![CDATA[<p>Why does the time of the server is set backwards? </p>
<p>Scalability most important here and with AI I just can&#8217;t see how my DB scales. Many companies use this method produce sequenced keys. IF you have any other good idea how to generate sequence keys without the internal clock please.. suggest something better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Reich</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52827</link>
		<dc:creator>Jesse Reich</dc:creator>
		<pubDate>Thu, 18 Oct 2012 23:39:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52827</guid>
		<description><![CDATA[This is very interesting. Do you risk the possibility of collisions if somehow the time on the server is set backwards?]]></description>
		<content:encoded><![CDATA[<p>This is very interesting. Do you risk the possibility of collisions if somehow the time on the server is set backwards?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52826</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Thu, 18 Oct 2012 01:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52826</guid>
		<description><![CDATA[I think you&#039;re on your own here. There&#039;s a lot to factor in about your application design (which I know nothing about), database design (likewise), and MySQL expertise. A discussion about those things is too long for the comments of a blog post. If you&#039;d like, you can hit me up via the &lt;a href=&quot;http://www.brentozar.com/consultants/contact-me/&quot; rel=&quot;nofollow&quot;&gt;contact form&lt;/a&gt; and I can let you know what a discussion around those things would look like.]]></description>
		<content:encoded><![CDATA[<p>I think you&#8217;re on your own here. There&#8217;s a lot to factor in about your application design (which I know nothing about), database design (likewise), and MySQL expertise. A discussion about those things is too long for the comments of a blog post. If you&#8217;d like, you can hit me up via the <a href="http://www.brentozar.com/consultants/contact-me/" rel="nofollow">contact form</a> and I can let you know what a discussion around those things would look like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idan</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52825</link>
		<dc:creator>Idan</dc:creator>
		<pubDate>Thu, 18 Oct 2012 00:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52825</guid>
		<description><![CDATA[I&#039;ve decided to go with uuid_short() as primary key. I need to make sure that each MySQL server has different server-id (&lt;=256). What do you think? - Furthermore, I am still having trouble decide whether to use bigint or binary(16) for storing the uuid_short number.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve decided to go with uuid_short() as primary key. I need to make sure that each MySQL server has different server-id (&lt;=256). What do you think? &#8211; Furthermore, I am still having trouble decide whether to use bigint or binary(16) for storing the uuid_short number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idan</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52824</link>
		<dc:creator>Idan</dc:creator>
		<pubDate>Wed, 17 Oct 2012 21:25:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52824</guid>
		<description><![CDATA[I mean a sequence of characters like one youtube uses or short URL services, it&#039;s not guid but I like the short sequence of characters for friendly URLs]]></description>
		<content:encoded><![CDATA[<p>I mean a sequence of characters like one youtube uses or short URL services, it&#8217;s not guid but I like the short sequence of characters for friendly URLs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idan</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52823</link>
		<dc:creator>Idan</dc:creator>
		<pubDate>Wed, 17 Oct 2012 21:22:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52823</guid>
		<description><![CDATA[Can you take a look at how pinterest does that in the pin URL, I want to implement the same way.]]></description>
		<content:encoded><![CDATA[<p>Can you take a look at how pinterest does that in the pin URL, I want to implement the same way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://www.brentozar.com/archive/2012/09/trouble-keys/#comment-52822</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Wed, 17 Oct 2012 20:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.brentozar.com/?p=15637#comment-52822</guid>
		<description><![CDATA[This would be a good first attempt at generating unique identifiers. This approach is somewhat naïve in that you&#039;re effectively going to be converting a somewhat random string into a somewhat random number and then adding some arbitrary chaos to it. Even then, so called smart keys like this can be problematic because your mechanism for translating a username to numerical data (a hashing function, if you will) needs to avoid collisions. The hash function will further randomize your insert order and that&#039;s going to cause some performance problems inserting into a B-tree data structure. In other systems, where order isn&#039;t a factor, hashing keys can be a good approach, but you need to be very careful before considering it for SQL Server.]]></description>
		<content:encoded><![CDATA[<p>This would be a good first attempt at generating unique identifiers. This approach is somewhat naïve in that you&#8217;re effectively going to be converting a somewhat random string into a somewhat random number and then adding some arbitrary chaos to it. Even then, so called smart keys like this can be problematic because your mechanism for translating a username to numerical data (a hashing function, if you will) needs to avoid collisions. The hash function will further randomize your insert order and that&#8217;s going to cause some performance problems inserting into a B-tree data structure. In other systems, where order isn&#8217;t a factor, hashing keys can be a good approach, but you need to be very careful before considering it for SQL Server.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 1/4 queries in 0.013 seconds using memcached
Object Caching 351/354 objects using memcached
Content Delivery Network via Amazon Web Services: S3: cdn.prod.brentozar.com

 Served from: www.brentozar.com @ 2013-05-24 19:49:58 by W3 Total Cache -->