Re: match an IP address

From: "Phoenix Kiula" <phoenix(dot)kiula(at)gmail(dot)com>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: "PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: match an IP address
Date: 2008-09-23 15:38:53
Message-ID: e373d31e0809230838i6f8a2689na24332d106bcbda4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message William Garrison 2008-09-23 15:49:18 Error in ALTER DATABASE command
Previous Message Steve Atkins 2008-09-23 15:37:53 Re: match an IP address