Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D20852E4815 for ; Fri, 11 Jan 2008 17:41:05 -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 24896-09 for ; Fri, 11 Jan 2008 17:40:58 -0400 (AST) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by postgresql.org (Postfix) with ESMTP id 7264B2E433C for ; Fri, 11 Jan 2008 17:41:02 -0400 (AST) Received: from osgiliath.mathom.us ([71.178.47.70]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JUI00IRW1K3AEH0@vms048.mailsrvcs.net> for pgsql-performance@postgresql.org; Fri, 11 Jan 2008 15:40:51 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by osgiliath.mathom.us (Postfix) with ESMTP id 6AFC96E61F for ; Fri, 11 Jan 2008 16:40:50 -0500 (EST) Received: from osgiliath.mathom.us ([127.0.0.1]) by localhost (osgiliath.home.mathom.us [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YkHuDkAd5R01 for ; Fri, 11 Jan 2008 16:40:48 -0500 (EST) Received: by osgiliath.mathom.us (Postfix, from userid 1000) id 9C73870CC5; Fri, 11 Jan 2008 16:40:48 -0500 (EST) Date: Fri, 11 Jan 2008 16:40:48 -0500 From: Michael Stone Subject: Re: Best way to index IP data? In-reply-to: <20080111213204.GV5294@mathom.us> To: pgsql-performance@postgresql.org Mail-followup-to: pgsql-performance@postgresql.org Message-id: <20080111214047.GW5294@mathom.us> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-disposition: inline X-Virus-Scanned: Debian amavisd-new at mathom.us X-Pgp-Fingerprint: 53 FF 38 00 E7 DD 0A 9C 84 52 84 C5 EE DF 7C 88 References: <200801101614.54729.kevin@kevinkempterllc.com> <36e682920801101541o7626bbddj428617144240c554@mail.gmail.com> <13179.1200064791@sss.pgh.pa.us> <20080111162747.GT5294@mathom.us> <24044.1200082058@sss.pgh.pa.us> <20080111151935.40c8d2fd.darcy@druid.net> <20080111213204.GV5294@mathom.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/79 X-Sequence-Number: 28318 On Fri, Jan 11, 2008 at 04:32:05PM -0500, Michael Stone wrote: >On Fri, Jan 11, 2008 at 03:19:35PM -0500, D'Arcy J.M. Cain wrote: >>Besides, there are many cases where you want to track both ipv4 and >>ipv6 for the same purpose and requiring two different fields would be >>less than ideal. > >And, there are many cases where you don't. I've got two kinds of db's >that have IPs in them. In some, the IP is a small part of a table which >is focused on something else. For those I use inet, which provides a >nice bit of future-proofing. In other db's the IPs are the primary >focus. There are lots and lots of IPs, and the space used by IPs may be >the largest chunk of a particular table. For those tables, I don't use >inet because the overhead really is a significant fraction of the space. Oh, yeah, the latter type also has seperate IPv4 and IPv6 tables, because there's no point in bloating 99% of the data for the 1% that's IPv6. Is that a niche requirement? Maybe--but I think that storing netmasks is even *more* of a niche... I'm not arguing for the removal of inet, but I do think there's room for more than one type--and I certainly think its nuts to pretend that inet can meet every requirement well. Mike Stone