AnsweredAssumed Answered

Reducing Time to complete script with multiple Omits and Finds

Question asked by sccardais on Sep 16, 2014
Latest reply on Sep 18, 2014 by philmodjunk

Title

Reducing Time to complete script with multiple Omits and Finds

Post

I have a file of Users - past and present - with over 30,000 records that is growing steadily. Each month, we use this file to send about 3,000 surveys to a random subset of this file. 

Before choosing the random group of 3,000, we need to omit records from consideration based on - currently - 11 tests.

I have a script that does this by performing a series of 11 tests in sequence using a two step process:  (1) Find (or Omit) test A,  (2) "Replace Field Contents" of field "OmitReason" with a description of the test it failed. Repeat this process for 10 more tests. In the end of this process, the field "OmitReason" for any single record might contain multiple reasons for omission such as  "Invalid email, < 90 days as customer, missing email address, etc.

The script works but it takes about 20 - 30 seconds to complete. I'd like to know if there is a more efficient way to write this script. The current process seems like brute force.

The process of creating a randomized list of 3,000 records based on the records remaining after the omission steps above is pretty straight forward so I don't think it's the reason the script seems to take so long.

Outcomes