MySQL Forums
Forum List  »  Performance

Help improve query slowness
Posted by: Asif Syed
Date: August 23, 2018 07:51AM

Hi, I need help to improve this query as this query becomes very slow and taking hours in production environment.Indexing are there.
Thanks.

SELECT count(*)
FROM g_prdsub
WHERE EXISTS
(SELECT 1
FROM fullProductsTbl d
WHERE d.prod_code = g_prdsub.prod_code
AND d.curcode =
(SELECT p.curcode
FROM g_prdmst p
WHERE p.prodnum = g_prdsub.prodnum)
AND d.prodnum=g_prdsub.prodnum
AND d.duplicate=1)
AND NOT EXISTS
(SELECT 1
FROM a_assets a
WHERE g_prdsub.prodsub = a.prodsub)

Options: ReplyQuote


Subject
Views
Written By
Posted
Help improve query slowness
1207
August 23, 2018 07:51AM
468
August 23, 2018 10:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.