Обсуждение: Adjacency Lists vs Nested Sets

Поиск
Список
Период
Сортировка

Adjacency Lists vs Nested Sets

От
Matthew Hixson
Дата:
Does Postgres have any native support for hierarchical data storage?
I'm familiar with the Adjacency List technique, but am trying to
determine whether or not Nested Sets would make sense for our
application or not.  I understand that Nested Sets might be better
for high read applications, but write heavy applications suffer from
poor performance.
   Any thoughts on the topic?
   -M@

Re: Adjacency Lists vs Nested Sets

От
Richard Huxton
Дата:
Matthew Hixson wrote:
> Does Postgres have any native support for hierarchical data storage?
> I'm familiar with the Adjacency List technique, but am trying to
> determine whether or not Nested Sets would make sense for our
> application or not.  I understand that Nested Sets might be better for
> high read applications, but write heavy applications suffer from poor
> performance.

You might find the "ltree" add-on in contrib useful. Look in the
"contrib" directory of your source installation, or the addons/extras
package of your distribution.

--
   Richard Huxton
   Archonet Ltd

Re: Adjacency Lists vs Nested Sets

От
Michael Glaesemann
Дата:
On Jul 10, 2007, at 13:51 , Richard Huxton wrote:

> Matthew Hixson wrote:
>> Does Postgres have any native support for hierarchical data
>> storage?  I'm familiar with the Adjacency List technique, but am
>> trying to determine whether or not Nested Sets would make sense
>> for our application or not.  I understand that Nested Sets might
>> be better for high read applications, but write heavy applications
>> suffer from poor performance.
>
> You might find the "ltree" add-on in contrib useful. Look in the
> "contrib" directory of your source installation, or the addons/
> extras package of your distribution.

And as for performance, do remember to benchmark your app using the
different techniques. Adjacency lists have their own performance
issues as well. It definitely depends on your app.

Michael Glaesemann
grzm seespotcode net