Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3B5251337B80 for ; Sat, 30 Apr 2011 15:13:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 44466-01-6 for ; Sat, 30 Apr 2011 18:13:14 +0000 (UTC) X-Greylist: delayed 00:06:37.345876 by SQLgrey-1.7.6 Received: from 63.mail-out.ovh.net (63.mail-out.ovh.net [91.121.185.56]) by mail.postgresql.org (Postfix) with SMTP id 4C3A31337C8A for ; Sat, 30 Apr 2011 15:11:33 -0300 (ADT) Received: (qmail 16653 invoked by uid 503); 30 Apr 2011 18:56:42 -0000 Received: from b7.ovh.net (HELO mail184.ha.ovh.net) (213.186.33.57) by 63.mail-out.ovh.net with SMTP; 30 Apr 2011 18:56:42 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 30 Apr 2011 20:04:52 +0200 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13) (lists%peufeu.com@88.161.102.87) by ns0.ovh.net with SMTP; 30 Apr 2011 20:04:52 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Joel Reymont" Cc: "pgsql-performance@postgresql.org" Subject: Re: stored proc and inserting hundreds of thousands of rows References: <4DBC004C020000250003D099@gw.wicourts.gov> <4881277622113933088@unknownmsgid> Date: Sat, 30 Apr 2011 20:04:51 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Pierre C" Message-ID: In-Reply-To: <4881277622113933088@unknownmsgid> User-Agent: Opera Mail/11.10 (Linux) X-Ovh-Tracer-Id: 5711408752944023237 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201104/438 X-Sequence-Number: 43500 If you want to search by geographical coordinates, you could use a gist index which can optimize that sort of things (like retrieving all rows which fit in a box).