I have a many-to-many relation R (two column binding table, both columns are foreign keys to the same table). Now, I’d like to find all pairs x, y such that x,y in R and y,x in R. What is the fastest way, how to do that when my table contains hundred thousands rows? I am using mysql.
I have a many-to-many relation R (two column binding table, both columns are foreign
Share
1 Answer