Re: SQL question.... - Mailing list pgsql-sql

From Steve Midgley
Subject Re: SQL question....
Date
Msg-id [email protected]
Whole thread Raw
In response to SQL question....  (Karl Denninger <[email protected]>)
Responses Re: SQL question....
List pgsql-sql
At 12:20 PM 5/21/2008, [email protected] wrote:
>Date: Wed, 21 May 2008 06:39:11 -0500
>From: Karl Denninger <[email protected]>
>To: Gurjeet Singh <[email protected]>
>Cc: [email protected]
>Subject: Re: SQL question....
>Message-ID: <[email protected]>
>
> > Also, if you don't have it already, you may create an index on IP
> > column for better performance.
> > Mail sent from my BlackLaptop device
>Its a very large table and is indexed already...

Not to completely beat this thing to death, but are you using an inet 
or other custom datatype for this? I think if you index ip's using a 
custom data type and search/group for specific octets, you'll get much 
better performance than just searching via a regular b-tree string 
index..

http://www.postgresql.org/docs/8.3/static/datatype-net-types.html

Steve 



pgsql-sql by date:

Previous
From: Karl Denninger
Date:
Subject: Re: SQL question....
Next
From: Karl Denninger
Date:
Subject: Re: SQL question....