I have this query here. It looks at 2 databases and compares values from each table in order to locate the pages that job would have printed. The new database I have fixes this type of issue, so I wont have to do a complex query like this.. But for now, I need to fix this.
This is the query. Any way to speed it up, it takes 2 min! It was much faster with mysql 6.0 alpha but going back to 5.5 its much slower.
SELECT a.user_name, a.job_name, a.printer_name, a.pages FROM printer_acc a WHERE (a.job_name, a.printer_name, a.user_name) IN (SELECT b.job_name, b.printer_name, b.user_name FROM dup b);
This is the query. Any way to speed it up, it takes 2 min! It was much faster with mysql 6.0 alpha but going back to 5.5 its much slower.
SELECT a.user_name, a.job_name, a.printer_name, a.pages FROM printer_acc a WHERE (a.job_name, a.printer_name, a.user_name) IN (SELECT b.job_name, b.printer_name, b.user_name FROM dup b);