Robert,

* Stephen Frost (sfr...@snowman.net) wrote:
> > In all seriousness, this is not a great test case unless you can
> > provide some scripts to make it easy to run it in a reproducible
> > fashion.  Can you?
> 
> Yeah, sure, I'll do that.  The PostGIS folks have scripts, but they're
> kind of ugly, tbh..  I'll give you what I used.

Alright, I made it dirt simple.  Get a DB set up, get PostGIS installed
in to it (or not, if you don't really want to..) and then download this:

http://tamriel.snowman.net/~sfrost/testcase.tar.gz
(Note: it's ~3.7G)

It'll untar in to a 'testcase' directory.  If you have PostGIS
instealled already, just run testcase/create_linearwater.sql first, then
run all the other .sql files in there in parallel by passing them to
psql, eg:

for file in tl*.sql; do
        psql -d mydb -f $file &
done

It shouldn't take long to see stuff start blocking on that extension
lock, since the table starts out empty.

If you don't want to install PostGIS, just change the
create_linearwater.sql script to have a column at the end named
'the_geom' and nuke the 'AddGeometryColumn' call.  If you run into
trouble getting PG to exhibit the expected behavior, you might try
combining sets of files, like so:

for state in `ls tl_2011_* | cut -f3 -d_ | cut -c1,2 | sort -u`; do
        cat tl_2011_${state}*.sql | psql -d mydb &
done

Which will reduce the number of processes to just the number of states
and territories (eg: 56), while increasing the amount of work each is
doing.

        Thanks,

                Stephen

Attachment: signature.asc
Description: Digital signature

Reply via email to