Re: Another try at reducing repeated detoast work for PostGIS

From: Andy Colson <andy(at)squeakycode(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Another try at reducing repeated detoast work for PostGIS
Date: 2009-08-18 18:07:58
Message-ID: 4A8AEDFE.9030505@squeakycode.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Mark Cave-Ayland <mark(dot)cave-ayland(at)siriusit(dot)co(dot)uk> writes:
>> Thanks for the patch. Fortunately enough I was able to find the dataset
>> from the original report above, and so I've tested your patch against
>> PostgreSQL 8.4. Unfortunately in the original test case, it doesn't seem
>> to give the same performance improvement for me that Paul was seeing :(
>
> Huh. As far as I can see this example should traverse the same code
> path. I was about to ask for the dataset, but I think you might have
> already sent it to me once --- does this look familiar?
>
> $ tar tvfj geography.tar.bz2
> -rw-r--r-- shade/shade 6444737 2008-06-06 13:33 geography.dbf
> -rw-r--r-- shade/shade 37179008 2008-06-06 13:33 geography.shp
> -rw-r--r-- shade/shade 263140 2008-06-06 13:33 geography.shx
>
> If so, what do I do with it exactly --- the file extensions convey
> nothing to my mind at the moment ...
>
> regards, tom lane
>

You'll need the postgis stuff I think.

use the shp2pgsql tool, like this:

shp2pgsql -D -S geography geography > geography.sql

-D write dump format (ie COPY)
-S creates simple geom's, if you get an error, remove the -S.

USAGE: shp2pgsql [<options>] <shapefile> [<schema>.]<table>

If you wanna see the data right from the shapefiles, you can use a tool
like qgis.

.dbf is regular dbase file
.shp is a shapefile (esri shapefile)
.shx is an index

-Andy

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-08-18 18:15:48 Re: REGRESS_OPTS versus MSVC build scripts
Previous Message Josh Berkus 2009-08-18 17:50:57 Re: "make install" now tries to build the documentation