<?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: A million tables</title>
	<atom:link href="http://www.flamingspork.com/blog/2006/03/09/a-million-tables/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flamingspork.com/blog/2006/03/09/a-million-tables/</link>
	<description>Ramblings which occasionally resemble reality. This is the blog of Stewart Smith.</description>
	<lastBuildDate>Wed, 17 Mar 2010 21:15:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christopher Browne</title>
		<link>http://www.flamingspork.com/blog/2006/03/09/a-million-tables/comment-page-1/#comment-27082</link>
		<dc:creator>Christopher Browne</dc:creator>
		<pubDate>Sat, 11 Mar 2006 04:51:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-27082</guid>
		<description>I took a perl script to basically throw a million table names like that into a file...

Threw that at a PostgreSQL 7.4.8 instance I had on a fractional part of an AIX p570 cluster; that took a little less than 31 minutes.

It pretty much corresponds to the joint cost of:

a) Creating a file in the filesystem (JFS2, of course), plus

b) Adding an entry to each of probably half a dozen system tables

This would seem to be something where any reasonably modern + reasonably competently designed database running on a (RM+RCD) filesystem should do this reasonably quickly...

Of course, what idiot would:

a) Count this as being important as anything other than a silly exercise, or

b) Actually try to use a million tables...</description>
		<content:encoded><![CDATA[<p>I took a perl script to basically throw a million table names like that into a file&#8230;</p>
<p>Threw that at a PostgreSQL 7.4.8 instance I had on a fractional part of an AIX p570 cluster; that took a little less than 31 minutes.</p>
<p>It pretty much corresponds to the joint cost of:</p>
<p>a) Creating a file in the filesystem (JFS2, of course), plus</p>
<p>b) Adding an entry to each of probably half a dozen system tables</p>
<p>This would seem to be something where any reasonably modern + reasonably competently designed database running on a (RM+RCD) filesystem should do this reasonably quickly&#8230;</p>
<p>Of course, what idiot would:</p>
<p>a) Count this as being important as anything other than a silly exercise, or</p>
<p>b) Actually try to use a million tables&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MacPlusG3</title>
		<link>http://www.flamingspork.com/blog/2006/03/09/a-million-tables/comment-page-1/#comment-27076</link>
		<dc:creator>MacPlusG3</dc:creator>
		<pubDate>Fri, 10 Mar 2006 09:05:03 +0000</pubDate>
		<guid isPermaLink="false">#comment-27076</guid>
		<description>Sure, the script is:

$ cat /home/stewart/mysql_create_table_torture
#!/usr/bin/php -f
&lt; ?php

$db = mysql_connect(&#039;127.0.0.1:9306&#039;,&#039;root&#039;)
or die(mysql_errno().&#039;: &#039;.mysql_error());
mysql_select_db(&#039;test&#039;,$db)
or die(mysql_errno().&#039;: &#039;.mysql_error());

for ($i = 1; $i &lt;= 1000000; $i++) {
print &quot;\r{$i}\t&quot;;
$query = &quot;CREATE TABLE t{$i} (i TINYINT) ENGINE=MyISAM&quot;;
mysql_query($query)
or die(mysql_errno().&#039;: &#039;.mysql_error());
}

mysql_close($db);
?&gt;</description>
		<content:encoded><![CDATA[<p>Sure, the script is:</p>
<p>$ cat /home/stewart/mysql_create_table_torture<br />
#!/usr/bin/php -f<br />
< ?php</p>
<p>$db = mysql_connect('127.0.0.1:9306','root')<br />
or die(mysql_errno().': '.mysql_error());<br />
mysql_select_db('test',$db)<br />
or die(mysql_errno().': '.mysql_error());</p>
<p>for ($i = 1; $i <= 1000000; $i++) {<br />
print "\r{$i}\t";<br />
$query = "CREATE TABLE t{$i} (i TINYINT) ENGINE=MyISAM";<br />
mysql_query($query)<br />
or die(mysql_errno().': '.mysql_error());<br />
}</p>
<p>mysql_close($db);<br />
?></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikal</title>
		<link>http://www.flamingspork.com/blog/2006/03/09/a-million-tables/comment-page-1/#comment-27066</link>
		<dc:creator>Mikal</dc:creator>
		<pubDate>Thu, 09 Mar 2006 23:38:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-27066</guid>
		<description>Hey, send me the script and I&#039;ll see what time I come up with...</description>
		<content:encoded><![CDATA[<p>Hey, send me the script and I&#8217;ll see what time I come up with&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
