Howdy ya'll - what's the best way to delete ~20 mi...
# general
s
Howdy ya'll - what's the best way to delete ~20 million records? Map/reduce script that sources in the saved search of these records and just delete one at a time or is there another more efficient way?
k
Your map reduce would be SINGIFCANTLY faster - because you can multithread it.
the mass updates are slow - and then no one else would be able to run one while you are doing it
also - I'd probably set the "yield" pretty low when you first start testing it so you don't wind up with an endless M/R
s
Great advice, but unfortunately I didn't put that logic in to this first test... I just wanted to see what would happen to the getinputdata if I used a search with 1.3 million results. Even though I commented out the actual deletion of the records, JUST the getinputdata phase has been going on for three hours and now I'm worried that it'll go on forever!!
Agh please tell me I didn't break our NS instance... Thankfully we have 5 queues, but still.
k
I don't think youv'e broken it
but I think the answer here is to delete the script file, and then the script will error out
also - this kinda stuff - always in sandbox man!
s
Yep - looks like deleting the script was the trick! And yeah you're right, shoulda known better... We just don't have that many records we can delete in sandbox - since those logs don't exist. Argh you're right though. Thanks so much as always @KevinJ of Kansas