<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V2/AnnotatedMaps.xsd">

<channel>
	<title>The Codebelay Blog &#187; Databases</title>
	<atom:link href="http://www.codebelay.com/blog/category/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codebelay.com/blog</link>
	<description>Safely Reach New Tech Heights Through Our Startup Insights</description>
	<lastBuildDate>Wed, 25 Jan 2012 19:12:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Oracle Breaks MySql.com&#8217;s Search</title>
		<link>http://www.codebelay.com/blog/2012/01/10/oracle-breaks-mysql-coms-search/</link>
		<comments>http://www.codebelay.com/blog/2012/01/10/oracle-breaks-mysql-coms-search/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 01:03:16 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[TechBiz]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=1195</guid>
		<description><![CDATA[If you go to the MySQL web site, and do a search on data type integer, you&#8217;ll notice something strange. The first result is a MySQL newsletter from May 2010. It wasn&#8217;t always like this. A few years ago I blogged about how Sun broke MySQL. Sun went on to claim that MySQL working out [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>If you go to the <a href="http://www.mysql.com/">MySQL web site</a>, and do a search on <b>data type integer</b>, you&#8217;ll notice something strange. The first result is a MySQL newsletter from May 2010.</p>
<p><a href="http://www.codebelay.com/blog/wp-content/uploads/2012/01/oracle_breaks_mysql_com_search.png"><img src="http://www.codebelay.com/blog/wp-content/uploads/2012/01/oracle_breaks_mysql_com_search.png" alt="" title="oracle_breaks_mysql_com_search" width="500" height="268" class="aligncenter size-full wp-image-1196" /></a></p>
<p>It wasn&#8217;t always like this. A few years ago I blogged about how <a href="http://www.codebelay.com/blog/2008/05/07/sun-breaks-mysqls-source-install/" title="Sun Breaks MySQL">Sun broke MySQL</a>. Sun went on to claim that MySQL working out of the box was something that was broken with MySQL, even though lots of sysadmins every where relied on this to get servers up and running quickly.</p>
<p>If you compare the search with <a href="http://www.google.com/search?client=safari&#038;rls=en&#038;q=inurl:mysql.com+data+type+integer&#038;ie=UTF-8&#038;oe=UTF-8">what they have on Google</a>, you&#8217;ll see that the first result and the many results below are *all* relevant.</p>
<p>Why do large organizations break what works?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2012/01/10/oracle-breaks-mysql-coms-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes on adding more MySQL databases</title>
		<link>http://www.codebelay.com/blog/2009/11/10/notes-on-adding-more-mysql-databases/</link>
		<comments>http://www.codebelay.com/blog/2009/11/10/notes-on-adding-more-mysql-databases/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 23:56:04 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[scalability hacking]]></category>
		<category><![CDATA[WebApps]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=665</guid>
		<description><![CDATA[Just notes for myself on adding more MySQL databases without shutting down the master database. on existing slave: /etc/init.d/mysqld stop copy data dir from /var/lib/mysql and data from /var/run/mysqld to new slave database: cd /var/lib tar cvf Mysql_slave.tar mysql/* scp Mysql_slave.tar root@new-db.com:/var/lib/. cd /var/run tar cvf Mysqld_slave.tar mysqld/* scp Mysqld_slave.tar mysqld/* scp Mysqld_slave.tar root@new-db.com:/var/run/. copy [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Just notes for myself on adding more MySQL databases without shutting down the master database.</p>
<p>on existing slave:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
/etc/init.d/mysqld stop
</div>
<p>copy data dir from /var/lib/mysql and data from /var/run/mysqld to new slave database:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
cd /var/lib<br />
tar cvf Mysql_slave.tar mysql/*<br />
scp Mysql_slave.tar root@new-db.com:/var/lib/.<br />
cd /var/run<br />
tar cvf Mysqld_slave.tar mysqld/*<br />
scp Mysqld_slave.tar mysqld/*<br />
scp Mysqld_slave.tar root@new-db.com:/var/run/.
</div>
<p>copy /etc/my.cnf from old slave to new slave<br />
add entry for new server-id</p>
<p>start existing slave:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
cd /var/lib<br />
tar xvf Mysql_slave.tar<br />
cd /var/run<br />
tar xvf Mysqld_slave.tar<br />
/etc/init.d/mysqld start
</div>
<p>start new slave:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
/etc/init.d/mysqld start<br />
mysql<br />
start slave;
</div>
<p>on masterdb:<br />
e.g.:</p>
<div style="border: 1px solid #fff; background: #000; color: #fff; padding: 5px 5px 5px 5px;">
grant replication slave on *.* to &#8216;repl&#8217;@&#8217;192.168.107.33&#8242; identified by &#8216;password&#8217;;
</div>
<p>test on master:<br />
create database repl;</p>
<p>check on slave:<br />
show databases; /* should show new database */</p>
<p>test on master:<br />
drop database repl;</p>
<p>check on slave:<br />
show databases; /* new database should be dropped */</p>
<p>Now it&#8217;s time to turn this into an automated shell script with <a href="http://expect.nist.gov/">Expect</a> in there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/11/10/notes-on-adding-more-mysql-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scaling from 100 to 100000 concurrent users in a day?</title>
		<link>http://www.codebelay.com/blog/2009/11/06/scaling-from-100-to-100000-concurrent-users-in-a-day/</link>
		<comments>http://www.codebelay.com/blog/2009/11/06/scaling-from-100-to-100000-concurrent-users-in-a-day/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 18:21:44 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[scalability hacking]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=655</guid>
		<description><![CDATA[Well, it looks pretty bad right now. A vendor just ceded control for web application architecture. Initial tests say that the site won&#8217;t do no more 100 users concurrently. Who the hell makes a web app without a slave database and calls themselves website architects? Apparently these guys did. Please start following if you want [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Well, it looks pretty bad right now. A vendor just ceded control for web application architecture. Initial tests say that the site won&#8217;t do no more 100 users concurrently.</p>
<p>Who the hell makes a web app without a slave database and calls themselves website architects? Apparently these guys did.</p>
<p>Please start following if you want to see if this web app can make it to launch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/11/06/scaling-from-100-to-100000-concurrent-users-in-a-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Benchmarking Inserts on Drizzle and MySQL</title>
		<link>http://www.codebelay.com/blog/2009/09/08/benchmarking-insert-on-drizzle-and-mysql/</link>
		<comments>http://www.codebelay.com/blog/2009/09/08/benchmarking-insert-on-drizzle-and-mysql/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 17:00:40 +0000</pubDate>
		<dc:creator>barce</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[scalability hacking]]></category>
		<category><![CDATA[WebApps]]></category>
		<category><![CDATA[mysql drizzle benchmarking]]></category>

		<guid isPermaLink="false">http://www.codebelay.com/blog/?p=630</guid>
		<description><![CDATA[I&#8217;m not comparing apples to apples yet&#8230; but out of the box, drizzle does inserts faster than MySQL using the same table type, InnoDB. Here&#8217;s what I&#8217;m comparing: drizzle r1126 configured with defaults, and MySQL 5.1.38 configured with ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \ --enable-thread-safe-client --enable-local-infile --enable-shared \ --with-plugins=partition,innobase which is really nothing complicated. SQL query caching [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;m not comparing apples to apples yet&#8230; but out of the box, <a href="https://launchpad.net/drizzle">drizzle</a> does inserts faster than <a href="http://www.mysql.com/">MySQL</a> using the same table type, <a href="http://en.wikipedia.org/wiki/Innodb">InnoDB</a>.</p>
<p>Here&#8217;s what I&#8217;m comparing:<br />
drizzle r1126 configured with defaults, and<br />
MySQL 5.1.38 configured with </p>
<div style="color: #fff; background: #000; padding: 5px 5px 5px 5px">
<pre>
./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \
--enable-thread-safe-client --enable-local-infile --enable-shared \
--with-plugins=partition,innobase
</pre>
</div>
<p>which is really nothing complicated.</p>
<p>SQL query caching is turned off on both database servers. Both are using the InnoDB engine plug-in.</p>
<p>I&#8217;m running these benchmarks on a MacBook Pro 2.4 GHz Intel Core 2 Duo with 2GB 1067 MHz DDR3 RAM.</p>
<p>I wrote <a href="http://www.codebelay.com/blog/2007/04/19/more-mysql-51-benchmarks-my-code-is-faster-and-slower-wtf/">benchmarking software about 2 years ago to test partitions</a> but I&#8217;ve since abstracted the code to be database agnostic.</p>
<p>You can get <a href="http://github.com/barce/partition_benchmarks/tree/master">the benchmarking code at Github</a>.</p>
<p>At the command-line, you type:</p>
<div style="color: #fff; background: #000; padding: 5px 5px 5px 5px">
php build_tables.php 10000 4 drizzle
</div>
<p>where 10000 is the number of rows allocated total, and 4 is the number of partitions for those rows.</p>
<p>You can type the same thing for mysql:</p>
<div style="color: #fff; background: #000; padding: 5px 5px 5px 5px">
php build_tables.php 10000 4 mysql
</div>
<p>and get interesting results.</p>
<p>Here&#8217;s what I got:</p>
<h3>MySQL</h3>
<pre>
bash-3.2$ php build_tables.php 10000 4 mysql
Elapsed time between Start and Test_Code_Partition: 13.856538
last table for php partition: users_03
Elapsed time between No_Partition and Code_Partition: 14.740206
-------------------------------------------------------------
marker           time index            ex time         perct
-------------------------------------------------------------
Start            1252376759.26094100   -                0.00%
-------------------------------------------------------------
No_Partition     1252376773.11747900   13.856538       48.45%
-------------------------------------------------------------
Code_Partition   1252376787.85768500   14.740206       51.54%
-------------------------------------------------------------
Stop             1252376787.85815000   0.000465         0.00%
-------------------------------------------------------------
total            -                     28.597209      100.00%
-------------------------------------------------------------
20000 rows inserted...
</pre>
<h3>drizzle</h3>
<pre>
bash-3.2$ php build_tables.php 10000 4 drizzle
Elapsed time between Start and Test_Code_Partition: 7.502141
last table for php partition: users_03
Elapsed time between No_Partition and Code_Partition: 7.072367
-------------------------------------------------------------
marker           time index            ex time         perct
-------------------------------------------------------------
Start            1252376733.68141500   -                0.00%
-------------------------------------------------------------
No_Partition     1252376741.18355600   7.502141        51.47%
-------------------------------------------------------------
Code_Partition   1252376748.25592300   7.072367        48.52%
-------------------------------------------------------------
Stop             1252376748.25627400   0.000351         0.00%
-------------------------------------------------------------
total            -                     14.574859      100.00%
-------------------------------------------------------------
20000 rows inserted...
</pre>
<p>MySQL: 699 inserts per second<br />
drizzle: 1372 inserts per second<br />
As far as inserts go, drizzle is about 2 times faster out of the box than MySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codebelay.com/blog/2009/09/08/benchmarking-insert-on-drizzle-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.319 seconds -->

