Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B95DF2E3359 for ; Thu, 10 Jan 2008 19:15:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 43103-06 for ; Thu, 10 Jan 2008 19:14:57 -0400 (AST) Received: from outbound-mail-20.bluehost.com (outbound-mail-20.bluehost.com [69.89.20.235]) by postgresql.org (Postfix) with SMTP id C0E212E019E for ; Thu, 10 Jan 2008 19:15:12 -0400 (AST) Received: (qmail 9520 invoked by uid 0); 10 Jan 2008 23:15:08 -0000 Received: from unknown (HELO box54.bluehost.com) (69.89.20.54) by mailproxy1.bluehost.com with SMTP; 10 Jan 2008 23:15:08 -0000 Received: from ip65-46-48-50.z48-46-65.customer.algx.net ([65.46.48.50] helo=[10.20.31.15]) by box54.bluehost.com with esmtp (Exim 4.68) (envelope-from ) id 1JD6c5-0005oB-CH for pgsql-performance@postgresql.org; Thu, 10 Jan 2008 16:15:05 -0700 From: Kevin Kempter To: pgsql-performance@postgresql.org Subject: Best way to index IP data? Date: Thu, 10 Jan 2008 16:14:54 -0700 User-Agent: KMail/1.9.6 (enterprise 0.20071123.740460) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801101614.54729.kevin@kevinkempterllc.com> X-Identified-User: {840:box54.bluehost.com:kevinkem:kevinkempterllc.com} {sentby:bopbeforesmtp 65.46.48.50 authed with kevinkempterllc.com} X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/58 X-Sequence-Number: 28297 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? Thanks in advance /Kevin