<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Code Spatter - Latest Comments in MySQL Fun</title><link>http://codespatter.disqus.com/</link><description></description><atom:link href="https://codespatter.disqus.com/mysql_fun/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 18 Jan 2008 01:06:55 -0000</lastBuildDate><item><title>Re: MySQL Fun</title><link>http://codespatter.com/2007/05/04/mysql-fun/#comment-1719128</link><description>&lt;p&gt;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's like 36,000% better!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg Allard</dc:creator><pubDate>Fri, 18 Jan 2008 01:06:55 -0000</pubDate></item><item><title>Re: MySQL Fun</title><link>http://codespatter.com/2007/05/04/mysql-fun/#comment-1719127</link><description>&lt;p&gt;Left the limit out even though I thought it wouldn't be able to do it, but it went through.&lt;/p&gt;&lt;p&gt;Affected rows: 4176 (Query took 176.0788 sec)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg Allard</dc:creator><pubDate>Fri, 18 Jan 2008 01:06:36 -0000</pubDate></item><item><title>Re: MySQL Fun</title><link>http://codespatter.com/2007/05/04/mysql-fun/#comment-1719126</link><description>&lt;p&gt;I'm doing this&lt;/p&gt;&lt;p&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 'taken' &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;/p&gt;&lt;p&gt;and getting this&lt;/p&gt;&lt;p&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 ' 1' at line 13&lt;/p&gt;&lt;p&gt;Fate doesn't want to allow me to restructure this database, it wants me to forever have slow queries.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg Allard</dc:creator><pubDate>Fri, 18 Jan 2008 01:06:17 -0000</pubDate></item><item><title>Re: MySQL Fun</title><link>http://codespatter.com/2007/05/04/mysql-fun/#comment-1719125</link><description>&lt;p&gt;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't seem to do nested queries efficiently&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Greg Allard</dc:creator><pubDate>Fri, 18 Jan 2008 01:05:51 -0000</pubDate></item></channel></rss>