Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1BCBB636AA0 for ; Tue, 18 Aug 2009 15:22:07 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26582-03 for ; Tue, 18 Aug 2009 18:21:59 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 574A9636AB5 for ; Tue, 18 Aug 2009 15:21:59 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id n7IILupN076342 for ; Tue, 18 Aug 2009 15:21:56 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id n7II7x7B054670 for pgsql-hackers@postgresql.org; Tue, 18 Aug 2009 15:07:59 -0300 (ADT) (envelope-from news) From: Andy Colson X-Newsgroups: pgsql.hackers Subject: Re: Another try at reducing repeated detoast work for PostGIS Date: Tue, 18 Aug 2009 13:07:58 -0500 Organization: Hub.Org Networking Services Lines: 43 Message-ID: <4A8AEDFE.9030505@squeakycode.net> References: <4201.1250530640@sss.pgh.pa.us> <4A8A7287.1080208@siriusit.co.uk> <25799.1250616857@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Tom Lane User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: <25799.1250616857@sss.pgh.pa.us> To: pgsql-hackers@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.11 tagged_above=-10 required=5 tests=BAYES_05=-1.11 X-Spam-Level: X-Archive-Number: 200908/1342 X-Sequence-Number: 143985 Tom Lane wrote: > Mark Cave-Ayland 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 [] [.] 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