<?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: Benchmarks for DATE operations in MySQL</title>
	<atom:link href="http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-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: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-in-mysql/#comment-15411</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Tue, 18 Nov 2008 22:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=133#comment-15411</guid>
		<description>OK that&#039;s fine, but to do LEFT() MySQL has first to convert the value from a date to a string -- which has all the locale etc overhead too.  Seriously, this cannot be anything but a bug.</description>
		<content:encoded><![CDATA[<p>OK that&#8217;s fine, but to do LEFT() MySQL has first to convert the value from a date to a string &#8212; which has all the locale etc overhead too.  Seriously, this cannot be anything but a bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-in-mysql/#comment-15409</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Tue, 18 Nov 2008 20:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=133#comment-15409</guid>
		<description>I agree with that. LEFT() is faster because DATE has to work with locale and l10n related things that LEFT doesn&#039;t. When using LEFT you are directly saying that the Leftomost part of the string is the date, and is the exact format MySQL is expecting it to be.</description>
		<content:encoded><![CDATA[<p>I agree with that. LEFT() is faster because DATE has to work with locale and l10n related things that LEFT doesn&#8217;t. When using LEFT you are directly saying that the Leftomost part of the string is the date, and is the exact format MySQL is expecting it to be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mysqlçš„datetimeæ™‚é–“æ ¼å¼ï¼Œä»¥leftå¢žé€²æŸ¥è©¢æ•ˆçŽ‡</title>
		<link>http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-in-mysql/#comment-15381</link>
		<dc:creator>mysqlçš„datetimeæ™‚é–“æ ¼å¼ï¼Œä»¥leftå¢žé€²æŸ¥è©¢æ•ˆçŽ‡</dc:creator>
		<pubDate>Wed, 12 Nov 2008 13:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=133#comment-15381</guid>
		<description>[...] é›–ç„¶ä¸Šä¸€ç¯‡èªªæ˜Žæœ¬äººåå¥½unixtimeçš„æ ¼å¼ã€‚ ä½†datetimeæ ¼å¼é‚„æ˜¯å¾ˆå¥½ç”¨çš„ã€‚ æœ€å¤§çš„å„ªé»žå°±æ˜¯åœ¨è³‡æ–™ç« çš„çµæžœä¸­ï¼Œå¯ä»¥è¿…é€Ÿçœ‹å‡ºåˆ°åº•æ˜¯å¹¾å¹´å¹¾æœˆå¹¾æ—¥ã€‚ ä»Šå¤©çœ‹åˆ°é€™ä¸€ç¯‡æ–‡ç«  Benchmarks for DATE operations in MySQL [...]</description>
		<content:encoded><![CDATA[<p>[...] é›–ç„¶ä¸Šä¸€ç¯‡èªªæ˜Žæœ¬äººåå¥½unixtimeçš„æ ¼å¼ã€‚ ä½†datetimeæ ¼å¼é‚„æ˜¯å¾ˆå¥½ç”¨çš„ã€‚ æœ€å¤§çš„å„ªé»žå°±æ˜¯åœ¨è³‡æ–™ç« çš„çµæžœä¸­ï¼Œå¯ä»¥è¿…é€Ÿçœ‹å‡ºåˆ°åº•æ˜¯å¹¾å¹´å¹¾æœˆå¹¾æ—¥ã€‚ ä»Šå¤©çœ‹åˆ°é€™ä¸€ç¯‡æ–‡ç«  Benchmarks for DATE operations in MySQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Shah</title>
		<link>http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-in-mysql/#comment-15342</link>
		<dc:creator>Amit Shah</dc:creator>
		<pubDate>Wed, 05 Nov 2008 10:11:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=133#comment-15342</guid>
		<description>Yes Baron,

You are right that LEFT() is a string function thats reason it is faster then DATE().</description>
		<content:encoded><![CDATA[<p>Yes Baron,</p>
<p>You are right that LEFT() is a string function thats reason it is faster then DATE().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheeri K. Cabral</title>
		<link>http://www.xaprb.com/blog/2006/06/12/benchmarks-for-date-operations-in-mysql/#comment-15330</link>
		<dc:creator>Sheeri K. Cabral</dc:creator>
		<pubDate>Sat, 01 Nov 2008 20:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=133#comment-15330</guid>
		<description>Baron,

Got here from your recent post that referenced this one.  It may be because LEFT() is just string manipulation, but the DATE() function has to extract the date part -- it may have to convert the date to an internal representation to extract the date.

That being said, there should at least be a part of the optimizer that deals with optimizing away something like DATE(col) where col is already in the date format.  For instance, SELECT DATE(col) should be optimized to SELECT col when col is in DATE format, so I&#039;d expect that to come back even faster than LEFT().</description>
		<content:encoded><![CDATA[<p>Baron,</p>
<p>Got here from your recent post that referenced this one.  It may be because LEFT() is just string manipulation, but the DATE() function has to extract the date part &#8212; it may have to convert the date to an internal representation to extract the date.</p>
<p>That being said, there should at least be a part of the optimizer that deals with optimizing away something like DATE(col) where col is already in the date format.  For instance, SELECT DATE(col) should be optimized to SELECT col when col is in DATE format, so I&#8217;d expect that to come back even faster than LEFT().</p>
]]></content:encoded>
	</item>
</channel>
</rss>

