Re: tree ordering with varbit

From: Scott Lamb <slamb(at)slamb(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: tree ordering with varbit
Date: 2002-11-18 07:14:30
Message-ID: 3DD89356.1030300@slamb.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Conway wrote:
> regression=# SELECT * FROM connectby('connectby_int', 'keyid',
> 'parent_keyid', '2', 0, '~') AS t(keyid int, parent_keyid int, level
> int, branch text);

Yeah, I saw that. But I don't think I can use it for a few reasons:

- I could't see a way to do multi-item sorts, like by score descending
and then post time ascending, for example.

- I couldn't see a way to filter for "messageroot_id = ?" first, so it
would probably be unnecesarily slow as the number of messages in this
discussion / the number of messages total ratio becomes small.

- Also performance - I can't cache the results as a row in the table,
which I could see being important at some point. Kind of a pain to keep
in sync, like all denormalized things, but I could see this being an
expensive operation.

Thanks,
Scott

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2002-11-18 10:56:23 Re: data restore
Previous Message Bruce Momjian 2002-11-18 04:39:41 Re: [GENERAL] DECLARE CURSOR