X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9370411F628C for ; Mon, 24 Apr 2006 19:48:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 11902-10 for ; Mon, 24 Apr 2006 19:48:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id F181B11F6232 for ; Mon, 24 Apr 2006 19:48:37 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id C211B56423; Mon, 24 Apr 2006 17:48:37 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Mon, 24 Apr 2006 17:48:37 -0500 Date: Mon, 24 Apr 2006 17:48:37 -0500 From: "Jim C. Nasby" To: Sriram Dandapani Cc: "Pgsql-Performance (E-mail)" Subject: Re: ip address data type Message-ID: <20060424224837.GF64695@pervasive.com> References: <6992E470F12A444BB787B5C937B9D4DF0406B11B@ca-mail1.cis.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF0406B11B@ca-mail1.cis.local> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060424:sdandapani@counterpane.com::KF72tmQ3Gbv1I7Yn:00000000000 0000000000000000000000005hAs X-Hashcash: 1:20:060424:pgsql-performance@postgresql.org::DtULaOxiX6byFNH+:00000 0000000000000000000000000Qvp X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/533 X-Sequence-Number: 18617 On Mon, Apr 24, 2006 at 03:45:14PM -0700, Sriram Dandapani wrote: > Hi > > I have queries that use like operators and regex patterns to determine > if an ip address is internal or external (this is against a table with > say 100 million distinct ip addresses). > > Does the inet data type offer comparison/search performance benefits > over plain text for ip addresses.. Well, benchmark it and find out. :) But it'd be hard to be slower than like or regex... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461