Re: Best way to index IP data?

From: Michael Stone <mstone+postgres(at)mathom(dot)us>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Best way to index IP data?
Date: 2008-01-11 21:40:48
Message-ID: 20080111214047.GW5294@mathom.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Stone 2008-01-11 22:02:36 Re: Best way to index IP data?
Previous Message Alvaro Herrera 2008-01-11 21:37:10 Re: Best way to index IP data?