13.07.2015 Views

Database.com REST API Developer's Guide - Salesforce.com

Database.com REST API Developer's Guide - Salesforce.com

Database.com REST API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ReferenceQueryParametersParameterqexplainDescriptionA SOQL query. Note that you will need to replace spaces with “+” charactersin your query string to create a valid URI. An example query parameter stringmight look like: “SELECT+Name+FROM+MyObject”A SOQL query to get performance feedback on. Use explain instead of q toget a response that details how <strong>Database</strong>.<strong>com</strong> will process your query. You canuse this feedback to further optimize your queries.The explain parameter is available in <strong>API</strong> version 30.0 and later.Note: Using explain with the <strong>REST</strong> <strong>API</strong> query resource is a pilotfeature. There is no support associated with this pilot feature. For moreinformation, contact salesforce.<strong>com</strong>, inc.Response bodyFor a query using the q parameter, the response contains an array of query result records. For a query using the explainparameter, the response contains one or more query plans that can be used to execute the query, sorted from most optimalto least optimal. Each plan has the following information:NamecardinalityfieldsTypenumberstring[]DescriptionThe estimated number of records the query would return, based on indexfields, if any.The index fields used for the query, if the leading operation type is Index,otherwise null.leadingOperationType stringThe primary operation type that will be used to optimize the query. Thiscan be one of these values:• Index—The query will use an index on the query object.• Other—The query will use optimizations internal to <strong>Database</strong>.<strong>com</strong>.• Sharing—The query will use an index based on the user’s sharingrules. If there are sharing rules that limit which records are visible tothe current user, those rules can be used to optimize the query.• TableScan—The query will scan all records for the query object, andwon’t use an index.relativeCostsobjectCardinalitysobjectTypenumbernumberstringThe cost of this query <strong>com</strong>pared to the SOQL selective query threshold.A value greater than 1.0 means the query won’t be selective. See “MoreEfficient SOQL Queries” in the Apex Code Developer’s <strong>Guide</strong> for moreinformation on selective queries.The approximate count of all records in your organization for the queryobject.The name of the query object, such as Merchandise__c.74

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!