Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id CB2172E0131 for ; Thu, 10 Jan 2008 19:25:29 -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 28091-02 for ; Thu, 10 Jan 2008 19:25:09 -0400 (AST) Received: from m.wordtothewise.com (fruitbat.wordtothewise.com [208.187.80.135]) by postgresql.org (Postfix) with ESMTP id 7E55D2E1988 for ; Thu, 10 Jan 2008 19:25:23 -0400 (AST) Received: from platter.wordtothewise.com (184.wordtothewise.com [208.187.80.184]) by m.wordtothewise.com (Postfix) with ESMTP id ECA448011B for ; Thu, 10 Jan 2008 15:25:20 -0800 (PST) Message-Id: From: Steve Atkins To: PostgreSQL Performance In-Reply-To: <200801101614.54729.kevin@kevinkempterllc.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: Best way to index IP data? Date: Thu, 10 Jan 2008 15:25:20 -0800 References: <200801101614.54729.kevin@kevinkempterllc.com> X-Mailer: Apple Mail (2.915) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/60 X-Sequence-Number: 28299 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