Re: match an IP address - Mailing list pgsql-general

From Phoenix Kiula
Subject Re: match an IP address
Date
Msg-id e373d31e0809230838i6f8a2689na24332d106bcbda4@mail.gmail.com
Whole thread Raw
In response to Re: match an IP address  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
<...snip...>
>
> I'd try a functional index first. If that didn't do the job, I'd use a
>  trigger-maintained column _purely_ as an optimisation (ie I could drop
>  it and lose no data) that stored text representations of the data.
>  Honestly, though, I expect the functional index would be more than good
>  enough and probably wouldn't have much of an INSERT/UPDATE cost.
<.../snip...>


I made a test table and tried a functional index (coalescing the two
columns). Works!

Now let me try that on a mirror on my full real table with millions of
rows and report back. Sounds like a cleaner design so I may be on to
something!

Hope this helps the original poster with some ideas too.

pgsql-general by date:

Previous
From: Steve Atkins
Date:
Subject: Re: match an IP address
Next
From: William Garrison
Date:
Subject: Error in ALTER DATABASE command