ltree_hierarchy icon indicating copy to clipboard operation
ltree_hierarchy copied to clipboard

Reason for the parent_id?

Open attilahorvath opened this issue 4 years ago • 1 comments

Hi,

I've been evaluating this gem for a project I'm working on and I'm a bit confused about the reliance on a parent_id here. The parent is always obvious by looking at the path and the ltree extension provides all the DB functions needed to work with this so I'm not sure about why it's necessary.

Is this being used to speed up the query performance? Would that be necessary even if I use a GiST index over the ltree?

There is another very similar gem that works fine without this parent ID and I'm trying to decide between these two solutions so I though I'd ask.

Thanks!

attilahorvath avatar Mar 04 '20 11:03 attilahorvath

@attilahorvath did you go ahead with this gem ?

tambakoo avatar Mar 27 '24 14:03 tambakoo