Re: [SQL] join on a like

2006-05-02 Thread Sim Zacks
I guess the real question is: what is more efficient - a join on a LIKE or a PLPGSQL function that has 2 loops, 1 for each bottom level child and one that takes the substring of that child one character at a time to get each parent? It sounds like you are saying that the join will actaully use

[SQL] join on a like

2006-05-02 Thread Sim Zacks
A friend suggested that I use the Like predicate as part of my join condition and I was wondering if that was wise. For example, I have a column that describes the level of an event. There is A,B,C and then they can have children, such as AA,AB,BA,BB and they can all have children as well. So

Re: [SQL] join on a like

2006-05-01 Thread [EMAIL PROTECTED]
If you use a btree index on the column, you should be able to use it in the like: http://www.postgresql.org/docs/8.1/interactive/indexes-types.html. ---(end of broadcast)--- TIP 6: explain analyze is your friend