The CreatorCon Call for Content is officially open! Get started here.

Job taking too much time to complete - Pls suggest code optimization techniques

bassasam
Giga Contributor

Hi ,

We have a scheduled job which takes 3 days to complete.

Can anyone please suggest  code optimization techniques..

Code basically does the following :

  • Glide through 5000 records on user table
  • For every user record , delete a record on a custom table and create a fresh record on the same custom table with the information on user record.
  • A few switch case statements are used in order to determine field values on the custom table
  • Encoded queries have been used on all query statements.
5 REPLIES 5

bassasam
Giga Contributor

Hi,

Thanks everyone for replying.. I will try out few things suggested here and get back.