Re: [GENERAL] Index on parent/child hierarchy

2012-01-31 Thread Merlin Moncure
On Sun, Jan 29, 2012 at 5:55 AM, Dmitriy Igrishin wrote: >> The point here is that you can exploit the tree structure with a btree >> index.  Before we got recursive queries, this was often the best way >> to do it, but now it's kind of a niche solution to be used when >> certain things fall into

Re: [GENERAL] Index on parent/child hierarchy

2012-01-29 Thread Dmitriy Igrishin
Hey, 2012/1/25 Merlin Moncure > On Wed, Jan 25, 2012 at 5:54 AM, Jason Armstrong > wrote: > > Hi > > > > I'm looking for advice on the best way to index a table that is defined > as: > > > > create table uuid.master(id uuid, parent uuid references > > uuid.master(id), type_id smallint, primary

Re: [GENERAL] Index on parent/child hierarchy

2012-01-25 Thread Merlin Moncure
On Wed, Jan 25, 2012 at 5:54 AM, Jason Armstrong wrote: > Hi > > I'm looking for advice on the best way to index a table that is defined as: > > create table uuid.master(id uuid, parent uuid references > uuid.master(id), type_id smallint, primary key(id)); > > Besides the primary key, I have these

Re: [GENERAL] Index on parent/child hierarchy

2012-01-25 Thread Simon Riggs
On Wed, Jan 25, 2012 at 11:54 AM, Jason Armstrong wrote: > Hi > > I'm looking for advice on the best way to index a table that is defined as: > > create table uuid.master(id uuid, parent uuid references > uuid.master(id), type_id smallint, primary key(id)); > > Besides the primary key, I have thes

[GENERAL] Index on parent/child hierarchy

2012-01-25 Thread Jason Armstrong
Hi I'm looking for advice on the best way to index a table that is defined as: create table uuid.master(id uuid, parent uuid references uuid.master(id), type_id smallint, primary key(id)); Besides the primary key, I have these two indices on the table too: CREATE INDEX master_parent_idx ON uuid.