Re: recursing down a tree

Поиск
Список
Период
Сортировка
От Curt Sampson
Тема Re: recursing down a tree
Дата
Msg-id Pine.NEB.4.44.0207152243290.492-100000@angelic.cynic.net
обсуждение исходный текст
Ответ на Re: recursing down a tree  (71062.1056@compuserve.com (--CELKO--))
Список pgsql-general
On 12 Jul 2002, --CELKO-- wrote:

> I am writing a separate book on "Trees in SQL" which will cover
> several different models; I hope to be done by the end of the year. I
> also hope to win the lottery.

Are you *the* Joe Celko? "I'm not worthy! I'm not worthy!" :-)
Though I hope you'll let us know when your book comes out.

> Updating is not the problem people think it is.  The nodes are in one
> table and the structure is in another.  The Tree table has (node_id,
> lft, rgt) in its rows and those the rows are very short; a lot of them
> fit into main storage at once.

Unfortunately, this is not such a great assumption for postgres,
unless you otherwise have longish rows. The row overhead is over
40 bytes, including the row pointers in the page (giving you about
150 rows per page, when all is said and done). So with smallish
rows anyway, and depending on the application, and yada yada yada,
you might be better off not using a separate table.

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


В списке pgsql-general по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: MySQL vs. PostgreSQL
Следующее
От: Steve Brett
Дата:
Сообщение: Re: SERIAL behaviour