Hi there,
I have a very large AccessInfo table which needs to reference it. However on the query it takes quite a time to return the results due to the size of the table. What is the most efficient way to query a self-referenced table. My current query is:
SELECT DISTINCT ai.UserID
FROM AccessInfo AS ai
INNER JOIN AccessInfo AS ai1 ON ai.HitsID = ai1.HitsID
INNER JOIN User AS u ON ai1.UserID = u.UserID;
TIA