From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: pgsql-bugs@postgresql.org
Subject: Re: Massive memory use for star query
Date: Sun, 17 Apr 2011 11:18:54 +1200
Message-ID: <4DAA23DE.5080106@catalyst.net.nz> (raw)
In-Reply-To: <4DA7CB25.5040102@catalyst.net.nz>
References: <4DA7CB25.5040102@catalyst.net.nz>
On 15/04/11 16:35, Mark Kirkwood wrote:
> Here's a simplified example using synthetic data (see attached to
> generate if desired):
>
For anyone else who might be want to play with this:
Patch with correction to make the directory reassignment work correctly,
plus an additional comment in the README mentioning the need to set this
in the generator and loading scripts.
Thanks
Mark
Attachments:starjoin-dirs.patch (text/x-patch, 951B) download
diff -c starjoin.orig/gendata.pl starjoin/gendata.pl
*** starjoin.orig/gendata.pl 2011-04-17 10:55:28.252595067 +1200
--- starjoin/gendata.pl 2011-04-17 10:55:48.684595066 +1200
***************
*** 14,20 ****
my %prevcatids;
print "generate cat\n";
! open(FH, "> /data0/dump/cat.dat") || die ("cannot open cat.dat: $!");
for ($i = 0; $i < $catrows; $i++) {
$catid = $i;
--- 14,20 ----
my %prevcatids;
print "generate cat\n";
! open(FH, "> $dir/cat.dat") || die ("cannot open cat.dat: $!");
for ($i = 0; $i < $catrows; $i++) {
$catid = $i;
diff -c starjoin.orig/README starjoin/README
*** starjoin.orig/README 2011-04-17 10:55:28.252595067 +1200
--- starjoin/README 2011-04-17 10:56:29.292595065 +1200
***************
*** 1,5 ****
--- 1,6 ----
Setup for (hopefully) excessive join memory use.
+ $ vi gendata.pl load.sql # set dump/load directory
$ ./gendata.pl
$ psql test < schema.sql
$ psql test < load.sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: mark.kirkwood@catalyst.net.nz
Subject: Re: Massive memory use for star query
In-Reply-To: <4DAA23DE.5080106@catalyst.net.nz>
References: <4DA7CB25.5040102@catalyst.net.nz> <4DAA23DE.5080106@catalyst.net.nz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox