Hi everyone,
I've been trying to get this query to run quicker. Currently it just takes too long. Does anyone have any suggestions about optimizing it?
I've been trying to get this query to run quicker. Currently it just takes too long. Does anyone have any suggestions about optimizing it?
Code:
SELECT DISTINCT outerquery.name, "group" FROM analog outerquery WHERE EXISTS (SELECT * FROM analog innerquery WHERE innerquery."group" = outerquery."group" AND innerquery.ptnum != outerquery.ptnum AND innerquery.name LIKE 'ZZZ_%') AND uterquery.name LIKE 'ZZZ_%'