IMO I think the performance of the subquery found in the
WHERE EXISTS and WHERE NOT EXISTS clauses could be affecting the performance of your view. See if you can tune this query either by adding indexes to the key fields of your query or using conditions that allow you to fetch smaller datasets if possible. Also consider doing the same for your outer query.
"Excellent people exceed
expectations".
From: Oj G <ojiwaj@yahoo.com>
To: Skunkworks forum <skunkworks@lists.my.co.ke>
Sent: Friday, May 22, 2009 9:15:22 AM
Subject: [Skunkworks] myDBA gurus
mySQL 5 is performing poorly when it comes to WHERE EXISTS AND NOT EXIST in views...
any myDBA with ideas how to optimize this...?
========================================
The optimist sees the doughnut; the pessimist the hole.
|