Re: Best way to index IP data?

From: Steve Atkins <steve(at)blighty(dot)com>
To: PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Best way to index IP data?
Date: 2008-01-10 23:25:20
Message-ID: DA6DE53A-2F69-46F3-8C96-B341ADCDDFAF@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


On Jan 10, 2008, at 3:14 PM, Kevin Kempter wrote:

> Hi List;
>
> We'll be loading a table with begining & ending I.P.'s - the table
> will likely
> have upwards of 30million rows. Any thoughts on how to get the best
> performance out of queries that want to look for IP ranges or the
> use of
> between queries? Should these be modeled as integers?

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.

Cheers,
Steve

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jonah H. Harris 2008-01-10 23:41:56 Re: Best way to index IP data?
Previous Message Joshua D. Drake 2008-01-10 23:22:45 Re: Best way to index IP data?