From: | "Greg Sabino Mullane" <greg(at)turnstep(dot)com> |
---|---|
To: | pgsql-advocacy(at)postgresql(dot)org |
Subject: | Re: MySQL million tables |
Date: | 2006-03-09 12:27:17 |
Message-ID: | da365fd5acda3d5fb7deabcb0a81172d@biglumber.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-advocacy |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I kicked this off last night before bed. It ran much quicker than
I thought, due to that 27 hour estimate.
Total time: 23 minutes 29 seconds :)
I committed every 2000 table commits. It could probably be made
to go slightly faster, as this was an out-of-the-box Postgres database,
with no postgresql.conf tweaking. I simply piped a text file into
psql for the testing, from the outout of a quick perl script:
my $max = 1_000_000;
my $check = 2_000;
print "BEGIN;\n";
for my $num (1..$max) {
print "CREATE TABLE foo$num (a smallint);\n";
$num%$check or print "COMMIT;\nBEGIN;\n";
}
print "COMMIT;\n";
And the proof:
greg=# select count(*) from pg_class where relkind='r' and relname ~ 'foo'
count
- ---------
1000000
Maybe I'll see just how far PG *can* go next. Time to make a PlanetPG post,
at any rate.
- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200603090720
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFEEB2yvJuQZxSWSsgRAvUbAKCzO80prZ4DX4l3iT0Dh+Re5M4TpACfW95z
y4cdkQjw2ubAP4btMwSw5iw=
=Ginx
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-03-09 13:20:58 | Re: PostgreSQL committer history? |
Previous Message | Jean-Paul Argudo | 2006-03-09 09:03:22 | Re: MySQL million tables |