Re: Best way to index IP data? - Mailing list pgsql-performance

From david@lang.hm
Subject Re: Best way to index IP data?
Date
Msg-id alpine.LFD.1.00.0801121104580.1952@xo-0D-5F-90.localdomain
Whole thread Raw
In response to Re: Best way to index IP data?  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-performance
On Fri, 11 Jan 2008, Greg Smith wrote:

>> You may well need netmasks to configure your interface, but there's
>> absolutely no need for them to identify an IP endpoint, which is all you
>> need to identify the destination the packet is going to, and that is the
>> most common use of IP addresses.
>
> Technically you can't ever send a packet unless you know both the endpoint
> and your local netmask.  As the sender, you're obligated to determine if the
> destination is on your local LAN (in which case you send it there) or if it
> goes to the gateway.  That's similar to a routing decision, but it's not
> quite--if you don't have to look in a routing table, it's not actually part
> of routing.

you also need to know your local IP address, but there is no reason to
need the netmask of the other end

my IP address is 64.81.33.126 why do you need to know my netmaask? how
would you find out what it is?

DNS doesn't report the netmask,and it's arguably the biggest database of
IP addresses around ;-)

one of the biggest reasons for storing IP addresses in a SQL database is
as part of log analysis.

David Lang

> I believe this sort of detail is why subnet masks are considered required for
> some things even though it doesn't seem like they are needed. Regardless, the
> details of how the packets move aren't important to some applications, and
> arguing over what the RFCs do and don't require doesn't change that.
>
> --
> * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>              http://www.postgresql.org/docs/faq
>

pgsql-performance by date:

Previous
From: Greg Smith
Date:
Subject: Re: Best way to index IP data?
Next
From: andrew@pillette.com
Date:
Subject: Re: Simple select, but takes long time