<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Perplexed Labs &#187; sql</title>
	<atom:link href="http://blog.perplexedlabs.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.perplexedlabs.com</link>
	<description>web development war stories from the frontlines to the backend</description>
	<lastBuildDate>Mon, 16 May 2011 14:19:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>mysqldump usage</title>
		<link>http://blog.perplexedlabs.com/2008/02/05/mysqldump-usage/</link>
		<comments>http://blog.perplexedlabs.com/2008/02/05/mysqldump-usage/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 19:23:26 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://perplexedlabs.com/2008/02/05/mysqldump-usage/</guid>
		<description><![CDATA[The info is available everywhere but for those who want it spoon fed into their eager mouths here goes: To dump a database to an optimized sql file and then tar/gz compress the file: > mysqldump --opt database > database.sql > tar -czvf database.tar.gz database.sql To export a database from the local mysql server to [...]


Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/02/09/automated-backups-a-5-minute-script-to-safer-data/' rel='bookmark' title='Permanent Link: Automated Backups &#8211; A 5 Minute Script To Safer Data'>Automated Backups &#8211; A 5 Minute Script To Safer Data</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/11/15/setup-python-2-6-4-mod_wsgi-2-6-and-django-1-1-1-on-centos-5-3-cpanel/' rel='bookmark' title='Permanent Link: Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)'>Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/' rel='bookmark' title='Permanent Link: Ruby On Rails and SliceHost Part 1: Initial Setup'>Ruby On Rails and SliceHost Part 1: Initial Setup</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The info is available everywhere but for those who want it spoon fed into their eager mouths here goes:</p>
<p>To dump a database to an optimized sql file and then tar/gz compress the file:</p>
<blockquote><p>> mysqldump --opt database > database.sql<br />
> tar -czvf database.tar.gz database.sql</p></blockquote>
<p>To export a database from the local mysql server to a remote mysql server:</p>
<blockquote><p>> mysqldump --opt -A | mysql --user=remote_user --password=remote_pw --host=xxx.xxx.xxx.xxx</p></blockquote>
<p>You're welcome!</p>


<p>Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/02/09/automated-backups-a-5-minute-script-to-safer-data/' rel='bookmark' title='Permanent Link: Automated Backups &#8211; A 5 Minute Script To Safer Data'>Automated Backups &#8211; A 5 Minute Script To Safer Data</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/11/15/setup-python-2-6-4-mod_wsgi-2-6-and-django-1-1-1-on-centos-5-3-cpanel/' rel='bookmark' title='Permanent Link: Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)'>Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/' rel='bookmark' title='Permanent Link: Ruby On Rails and SliceHost Part 1: Initial Setup'>Ruby On Rails and SliceHost Part 1: Initial Setup</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.perplexedlabs.com/2008/02/05/mysqldump-usage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tales of profiling when optimizing</title>
		<link>http://blog.perplexedlabs.com/2008/02/04/tales-of-profiling-when-optimizing/</link>
		<comments>http://blog.perplexedlabs.com/2008/02/04/tales-of-profiling-when-optimizing/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 20:13:51 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[optimizing]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://perplexedlabs.com/2008/02/04/tales-of-profiling-when-optimizing/</guid>
		<description><![CDATA[Spending most of the day optimizing a page that (when I began) took 8.6 seconds to execute. Using some basic profiling techniques helped tremendously in not wasting my time and efforts attempting to optimize a portion of code that won't yield appreciable gains. The time intensive code for applications I write generally fall into either [...]


Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2008/02/04/php-simple-profiling-class/' rel='bookmark' title='Permanent Link: PHP Simple Profiling Class'>PHP Simple Profiling Class</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/12/php-fast-large-megabyte-data-transfer-between-sessions/' rel='bookmark' title='Permanent Link: PHP fast, large (megabyte), data transfer between sessions'>PHP fast, large (megabyte), data transfer between sessions</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/08/seconds-to-minutesseconds-in-rails/' rel='bookmark' title='Permanent Link: Seconds to Minutes/Seconds in Rails'>Seconds to Minutes/Seconds in Rails</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Spending most of the day optimizing a page that (when I began) took 8.6 seconds to execute.  Using some basic profiling techniques helped tremendously in not wasting my time and efforts attempting to optimize a portion of code that won't yield appreciable gains.</p>
<p>The time intensive code for applications I write generally fall into either data retrieval or data processing.  In this particular case the app was spending about 1.5 seconds to retrieve orders that composed a given trade - 1 query per order (p.s. there are 1000's and 1000's of orders).   I re-wrote this portion with 1 query to load into memory all the orders beforehand and cut execution time to 0.11 seconds.</p>
<p>After all is said and done, the page execution time sits at 1.7 seconds.   That's an ~80% improvement!</p>


<p>Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2008/02/04/php-simple-profiling-class/' rel='bookmark' title='Permanent Link: PHP Simple Profiling Class'>PHP Simple Profiling Class</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/12/php-fast-large-megabyte-data-transfer-between-sessions/' rel='bookmark' title='Permanent Link: PHP fast, large (megabyte), data transfer between sessions'>PHP fast, large (megabyte), data transfer between sessions</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/08/seconds-to-minutesseconds-in-rails/' rel='bookmark' title='Permanent Link: Seconds to Minutes/Seconds in Rails'>Seconds to Minutes/Seconds in Rails</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.perplexedlabs.com/2008/02/04/tales-of-profiling-when-optimizing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

