Big Object Basics

Big objects allow you to store and manage a massive amount of data on the Salesforce platform.

Big objects provide consistent performance for a billion records or more, and are accessible with a standard set of APIs to your org or external system. Think of all that data! We basically took a gigant-o-ray to the objects you already know and love to create big objects.

  • Standard big objects – example is FieldHistoryArchive
  • Custom big objects

Uses of Big Objects like –

  1. 360° view of Customer – You can store any customer information like transactions, orders, billing details, use a Custom Big object to keep track of every details.

  2. Auditing and Tracking – Keep a long-term view of your users’ Salesforce usage for analysis or compliance purposes.
  3. Historical Archive -Maintain access to historical data for analysis or compliance purposes while optimizing the performance of your core CRM or Lightning Platform applications.

Querying Big Objects –

You can query big objects using standard SOQL or with Async SOQL.

Points to Remember –

  • Big objects support only object and field permissions.
  • You must use the Metadata API to define or add a field to a custom big object. You can’t do it through the UI.
  • SOQL relationship queries are based on a lookup field from a big object to a standard or custom object in the select field list (not in filters or subqueries).
  • Big objects support custom Salesforce Lightning and Visualforce components rather than standard UI elements (home pages, detail pages, list views, and so on).
  • You can create up to 100 big objects per org. The limits for big object fields are similar to the limits on custom objects, and depend on your org’s license type.
  • Big objects don’t support transactions that include big objects, standard objects, and custom objects.
  • To support the scale of data in a big object, you can’t use triggers, flows, processes, and the Salesforce app.

Query Big Object using SOQL and Async SOQL –

Big objects can be queried using SOQL or Async SOQL. Async SOQL uses to handle the massive volume of data that can be kept within a big object. Because Async SOQL queries are run asynchronously, you don’t have to worry about queries timing out.

Generally, you want to use Async SOQL over standard SOQL when you’re dealing with large amounts of data. If you only need a small dataset from a big object, or if you need the results immediately, use standard SOQL. Async SOQL also works on standard and non-big custom objects, but support for those objects is in pilot.

Use standard SOQL when:

  • You want to display the results in the UI without having the user wait for results.
  • You want results returned immediately for manipulation within a block of Apex code.
  • You know that the query will return a small amount of data.
Use Async SOQL when:

  • You are querying against millions of records.
  • You want to ensure that your query completes.
  • You don’t need to do aggregate queries or filtering outside of the index.

 

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s