Skip to content
Advertisement

Query is taking a long time to execute [closed]

The query is taking too much time to execute. Ots comparing some condition and then fetching data accordingly.

Please guide me why its happening.

How i calculate batch Size

This is my query don’t why its taking too much time to execute. In one SP there are lot of SP But in this SP i am getting more time what should i modify in this please guide me.

Advertisement

Answer

You can try the below query

You are making batches for records greater than 10000, but say if your records are 9999, then your loop goes for 9999 iterations unnecesarilly.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement