Re: Best implementation of PATRICIA

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Povolotsky <tarkhil(at)over(dot)ru>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Best implementation of PATRICIA
Date: 2007-08-25 19:34:01
Message-ID: 24504.1188070441@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alex Povolotsky <tarkhil(at)over(dot)ru> writes:
> I'm working on a project requiring fast query like 'does ADDRESS belongs
> to SET OF NETWORKS?'. Naturally, such a query is better implemented
> using PATRICIA, but building PATRICIA tree is a relatively long task and
> is better to be done once, for instance, at server startup.

> I'm thinking of implementing such a tree using stored procedures, and
> looking for advise from postgresql-hackers: how can I hook startup of
> server?

> Idea of having something like a blob to store and restore PATRICIA tree
> may be better suited to standard SQL, but I'm looking for more elegant
> solution. Or am I totally wrong?

If it's as expensive as all that, why would you want to redo it even at
server start? Maybe a new index type would be appropriate.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-08-25 21:45:08 [WIP PATCH] Lazily assign xids for toplevel Transactions
Previous Message Oleg Bartunov 2007-08-25 19:10:02 Re: Best implementation of PATRICIA