<?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: MySQL Fun</title>
	<atom:link href="http://codespatter.com/2007/05/04/mysql-fun/feed/" rel="self" type="application/rss+xml" />
	<link>http://codespatter.com/2007/05/04/mysql-fun/</link>
	<description></description>
	<lastBuildDate>Thu, 04 Mar 2010 11:43:30 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-9</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-9</guid>
		<description>After all the fighting to get this to a better table schema, it increased the query I was trying to optimize from 23.0878 seconds to 0.0638 seconds. That&#039;s like 36,000% better!</description>
		<content:encoded><![CDATA[<p>After all the fighting to get this to a better table schema, it increased the query I was trying to optimize from 23.0878 seconds to 0.0638 seconds. That&#8217;s like 36,000% better!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-13374</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-13374</guid>
		<description>After all the fighting to get this to a better table schema, it increased the query I was trying to optimize from 23.0878 seconds to 0.0638 seconds. That&#039;s like 36,000% better!</description>
		<content:encoded><![CDATA[<p>After all the fighting to get this to a better table schema, it increased the query I was trying to optimize from 23.0878 seconds to 0.0638 seconds. That&#39;s like 36,000% better!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-8</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:06:36 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-8</guid>
		<description>Left the limit out even though I thought it wouldn&#039;t be able to do it, but it went through.

Affected rows: 4176 (Query took 176.0788 sec)</description>
		<content:encoded><![CDATA[<p>Left the limit out even though I thought it wouldn&#8217;t be able to do it, but it went through.</p>
<p>Affected rows: 4176 (Query took 176.0788 sec)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-13373</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:06:36 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-13373</guid>
		<description>Left the limit out even though I thought it wouldn&#039;t be able to do it, but it went through.&lt;br&gt;&lt;br&gt;Affected rows: 4176 (Query took 176.0788 sec)</description>
		<content:encoded><![CDATA[<p>Left the limit out even though I thought it wouldn&#39;t be able to do it, but it went through.</p>
<p>Affected rows: 4176 (Query took 176.0788 sec)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-7</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-7</guid>
		<description>I&#039;m doing this

UPDATE tbd_requests 
SET request_taken_time = 
( 
SELECT history_created 
FROM tbd_history 
WHERE tbd_history.request_id = tbd_requests.request_id 
AND history_action LIKE &#039;taken&#039; 
ORDER BY history_created DESC 
LIMIT 0, 1 
) 
WHERE request_type != 11 
ORDER BY request_id ASC 
LIMIT 0, 1 

and getting this 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039; 1&#039; at line 13 

Fate doesn&#039;t want to allow me to restructure this database, it wants me to forever have slow queries.</description>
		<content:encoded><![CDATA[<p>I&#8217;m doing this</p>
<p>UPDATE tbd_requests<br />
SET request_taken_time =<br />
(<br />
SELECT history_created<br />
FROM tbd_history<br />
WHERE tbd_history.request_id = tbd_requests.request_id<br />
AND history_action LIKE &#8216;taken&#8217;<br />
ORDER BY history_created DESC<br />
LIMIT 0, 1<br />
)<br />
WHERE request_type != 11<br />
ORDER BY request_id ASC<br />
LIMIT 0, 1 </p>
<p>and getting this </p>
<p>#1064 &#8211; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216; 1&#8242; at line 13 </p>
<p>Fate doesn&#8217;t want to allow me to restructure this database, it wants me to forever have slow queries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-13372</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-13372</guid>
		<description>I&#039;m doing this&lt;br&gt;&lt;br&gt;UPDATE tbd_requests &lt;br&gt;SET request_taken_time = &lt;br&gt;( &lt;br&gt;SELECT history_created &lt;br&gt;FROM tbd_history &lt;br&gt;WHERE tbd_history.request_id = tbd_requests.request_id &lt;br&gt;AND history_action LIKE &#039;taken&#039; &lt;br&gt;ORDER BY history_created DESC &lt;br&gt;LIMIT 0, 1 &lt;br&gt;) &lt;br&gt;WHERE request_type != 11 &lt;br&gt;ORDER BY request_id ASC &lt;br&gt;LIMIT 0, 1 &lt;br&gt;&lt;br&gt;and getting this &lt;br&gt;&lt;br&gt;#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039; 1&#039; at line 13 &lt;br&gt;&lt;br&gt;Fate doesn&#039;t want to allow me to restructure this database, it wants me to forever have slow queries.</description>
		<content:encoded><![CDATA[<p>I&#39;m doing this</p>
<p>UPDATE tbd_requests <br />SET request_taken_time = <br />( <br />SELECT history_created <br />FROM tbd_history <br />WHERE tbd_history.request_id = tbd_requests.request_id <br />AND history_action LIKE &#39;taken&#39; <br />ORDER BY history_created DESC <br />LIMIT 0, 1 <br />) <br />WHERE request_type != 11 <br />ORDER BY request_id ASC <br />LIMIT 0, 1 </p>
<p>and getting this </p>
<p>#1064 &#8211; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#39; 1&#39; at line 13 </p>
<p>Fate doesn&#39;t want to allow me to restructure this database, it wants me to forever have slow queries.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-6</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-6</guid>
		<description>I think I might need to do some nested query where I set request_taken_time = (SELECT history_created order by blah blah) That may be the only way to get it to work accurately, however it will be slow since it doesn&#039;t seem to do nested queries efficiently</description>
		<content:encoded><![CDATA[<p>I think I might need to do some nested query where I set request_taken_time = (SELECT history_created order by blah blah) That may be the only way to get it to work accurately, however it will be slow since it doesn&#8217;t seem to do nested queries efficiently</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2007/05/04/mysql-fun/comment-page-1/#comment-13371</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Fri, 18 Jan 2008 06:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=4#comment-13371</guid>
		<description>I think I might need to do some nested query where I set request_taken_time = (SELECT history_created order by blah blah) That may be the only way to get it to work accurately, however it will be slow since it doesn&#039;t seem to do nested queries efficiently</description>
		<content:encoded><![CDATA[<p>I think I might need to do some nested query where I set request_taken_time = (SELECT history_created order by blah blah) That may be the only way to get it to work accurately, however it will be slow since it doesn&#39;t seem to do nested queries efficiently</p>
]]></content:encoded>
	</item>
</channel>
</rss>
