+ Start a Discussion
tcherlettcherlet 

Question about mass update (+million records)

Got a question related to updating more than a million records.

The objective is that I need to fill in a certain field on +1 million records, without the triggers being fired.

 

What are the possible ways to do this (Batch apex, demandtools,apex data loader,...?)?

And what are the advantages/disadvantages?

 

thx in advance!

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

Possible ways to do this :

 

1) Data loader - Can process upto 5 Million Records

2) Batch Apex  - Can process up to 50 Million records

 

If you are inserting the records which will be one time process (hopefully) then you should go for data loader(As you have only 1+ million records not will not reach 5 million). Also if you are updating the records then data loader will be helpful.

 

But if you have similar type of data to upload then you can also go with batch Apex. Generally we use batch apex when we have similar kind of data (same values depending upon any criteria)  to update or insert in records.

 

In your case data loader will be most suitable.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

All Answers

Ankit AroraAnkit Arora

Possible ways to do this :

 

1) Data loader - Can process upto 5 Million Records

2) Batch Apex  - Can process up to 50 Million records

 

If you are inserting the records which will be one time process (hopefully) then you should go for data loader(As you have only 1+ million records not will not reach 5 million). Also if you are updating the records then data loader will be helpful.

 

But if you have similar type of data to upload then you can also go with batch Apex. Generally we use batch apex when we have similar kind of data (same values depending upon any criteria)  to update or insert in records.

 

In your case data loader will be most suitable.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

This was selected as the best answer
tcherlettcherlet

Ok thanks for the fast answer, just another small question.

 

When Batch Apex is performed, are the triggers fired?

Ankit AroraAnkit Arora

Yes in all cases Batch Apex, Data Loader, import wizard etc... Trigger will fire each time.

 

If you don't want trigger to fire each time then, you can disable them till the batch is completed after that you can enable the triggers again. But this not comes under good practice.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

tcherlettcherlet

Yes I know, but this really exceptional situation.

 

Thanks for the answers!

bs881026bs881026
HI,

If I find that after the Batch is run, few records have been updated  whereas few have not, then where do I go to check how many records have been updated, and which all records have not been updated.
Thanks