Home » SQL & PL/SQL » SQL & PL/SQL » Help improve SQL Query (12c Linux)
Help improve SQL Query [message #684498] Tue, 15 June 2021 13:59 Go to next message
deepa_balu
Messages: 74
Registered: March 2005
Member
update ft_batch as b
set works_count = (select count(w.ft_work_uid) from ft_work as w where w.ft_batch_uid = b.ft_batch_uid)
where b.works_count = 0;


Please help me if there is a better way to write this query to improve performance.

Indexes are preset in appropriate columns.
Its using index on w.ft_batch_uid and sequential scan on ft_batch table
Re: Help improve SQL Query [message #684499 is a reply to message #684498] Tue, 15 June 2021 14:05 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

For any performances question, please read http://www.orafaq.com/forum/index.php/mv/msg/206002/433888/#msg_433888 and post the required information.

Also, if you want to continue to get help you should envisage to feedback in your topics.

Previous Topic: ANSI vs Oracle Join Syntax
Next Topic: Automate repartitions
Goto Forum:
  


Current Time: Fri Apr 19 14:56:58 CDT 2024