-
Most optimum way to search a column containing a list of values
Hello,
I have a table with ‘parent’ and ‘child’ columns containing an id. I have another column named ‘chain’ that is a list containing id’s of parents all the way to the root. This means that for a given row, the chain column contains the path to the root node.Now what I’d like to do is find all rows whose chain column contains a particular id. I have the following:
select from table where id in/:chainIs there a better way to achieve this? I’m looking to see if this can be improved either by redoing the query or a reorganization of the data.
Log in to reply.