Slow Query in Import Product

24 views
Skip to first unread message

Pritesh Shah

unread,
Jan 3, 2018, 11:51:18 AM1/3/18
to iDempiere
Hello,

I found slow query in Import product as below,
sql = new StringBuilder ("UPDATE I_Product i ")
.append("SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Value not unique,' ")
.append("WHERE I_IsImported<>'Y'")
.append(" AND Value IN (SELECT Value FROM I_Product ii WHERE i.AD_Client_ID=ii.AD_Client_ID GROUP BY Value HAVING COUNT(*) > 1)").append(clientCheck);

Above instead of i.AD_Client_ID=ii.AD_Client_ID, can we not just do like ii.AD_Client_ID= m_AD_Client_ID;

If we add client id value instead of joining I_Product table by AD_Client_ID would give results very quick.

Any thoughts?


Reply all
Reply to author
Forward
0 new messages