What is the difference between the normal “insert” operation and “database.insert” operation ? Which is preferred over the other and why ?



What is the difference between the normal “insert” operation and “database.insert&..

Answer / Pankaj Kumar

The normal insert operation is used to insert records using Apex code or SOQL queries, while database.insert is a method in Apex that allows you to insert sObjects asynchronously. The normal insert operation is synchronous, which can be a disadvantage when dealing with large amounts of data. Therefore, it's preferred to use database.insert for bulk data operations due to its asynchronous nature and improved performance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Salesforce Interview Questions

What is lightning: or ui: in any lightning component? : salesforce lightning component

1 Answers  


How to call a controller method within a javascript?

1 Answers  


What is a Sharing Rule?

1 Answers  


Which fields cannot be added as a custom index?

1 Answers  


Does user can create insert their own custom logo, while creating their own custom applications?

1 Answers  


What are the custom settings? When will you use custom settings?

1 Answers  


What is included with each standard controller? : salesforce visualforce

1 Answers  


What will happen if you try to update record in after trigger context?

1 Answers  


What is the purpose or use of @testvisible?

1 Answers  


What is a Public Group?

1 Answers  


What is the point of the 'dahboard'?

1 Answers  


What are the Exceptions Statements in salesforce?

1 Answers  


Categories