Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 95D042E4371 for ; Fri, 11 Jan 2008 05:31:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 27735-08 for ; Fri, 11 Jan 2008 05:31:25 -0400 (AST) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by postgresql.org (Postfix) with ESMTP id 8D8952E4364 for ; Fri, 11 Jan 2008 05:31:29 -0400 (AST) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id F3A6917F54C for ; Fri, 11 Jan 2008 10:31:26 +0100 (CET) Received: from pulsar.staff.proxad.net (pulsar.staff.proxad.net [213.228.1.109]) by smtp8-g19.free.fr (Postfix) with ESMTP id DBDAC17F586 for ; Fri, 11 Jan 2008 10:31:26 +0100 (CET) Date: Fri, 11 Jan 2008 10:31:26 +0100 (CET) From: Pomarede Nicolas X-X-Sender: npomarede@localhost To: pgsql-performance@postgresql.org Subject: Re: Best way to index IP data? In-Reply-To: <36e682920801101541o7626bbddj428617144240c554@mail.gmail.com> Message-ID: References: <200801101614.54729.kevin@kevinkempterllc.com> <36e682920801101541o7626bbddj428617144240c554@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/63 X-Sequence-Number: 28302 On Thu, 10 Jan 2008, Jonah H. Harris wrote: > On Jan 10, 2008 6:25 PM, Steve Atkins wrote: >> http://pgfoundry.org/projects/ip4r/ >> >> That has the advantage over using integers, or the built-in inet type, >> of being indexable for range and overlap queries. > > Agreed. ip4r is da bomb. Hello to all, I also have to store a lot of IP v4 addresses, and I think the internal inet type is somewhat overkill for that, since it always require 8 bytes, even if you don't need to store a netmask. When storing millions of IP add, this means MB of space used for nothing in that case. As ip4r seems to work very well with postgresql, is there a possibility to see it merged in postgresql, to have a native 4 bytes IPv4 address date type ? Nicolas