Posted in Salesforce

Difference between Database.query() and Database.getQueryLocator()

1. Database.query() retrives 50K records where as Database.getQueryLocator() retrives 50 million records from Database.
2. Database.query() is used to construct dynamic query instead of using SOQL query where as Database.getQueryLocator() is the return type of start method of a Batch class.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s