You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
SOQL should be used as much as possible for executing data functions before retrieving.
Describe the solution you'd like
A couple of examples...
EXAMPLE 1:
select count(*) from salesforce_opportunity
^ this query will
a) download all records from salesforce_opportunity
b) perform a SQL count() on the data in postgres
It works for a few hundred records maybe, but for data sets of thousands this takes quite awhile. SOQL has its own count() function, so why not use that and let Salesforce carry the load?
EXAMPLE 2:
select id, createddate from salesforce_account limit 10
^ this query will retrieve the first 10 records from the Account object and runs relatively quickly.
but...
select id, createddate from account order by createddate desc limit 10
^ this query will download all records from the Account object then sort them in Postgres by createddate, then return the first 10 records which can take quite awhile.
Salesforce has its own 'order by' function - why not use it and let Salesforce do the lifting here?
Describe alternatives you've considered
Waiting for real simple queries like the above to execute, or even time-out if large data is present in Salesforce.
The text was updated successfully, but these errors were encountered:
At the moment, for queries like the one you shared above, we don't get any order by information from queries, so unfortunately we wouldn't be able to use that information to affect how we form the SOQL and make API calls.
I'm closing this issue in the meantime as the feature is not available, but if there are additional use cases outside of order by, please feel free to re-open!
Is your feature request related to a problem? Please describe.
SOQL should be used as much as possible for executing data functions before retrieving.
Describe the solution you'd like
A couple of examples...
EXAMPLE 1:
select count(*) from salesforce_opportunity
^ this query will
a) download all records from salesforce_opportunity
b) perform a SQL count() on the data in postgres
It works for a few hundred records maybe, but for data sets of thousands this takes quite awhile. SOQL has its own count() function, so why not use that and let Salesforce carry the load?
EXAMPLE 2:
select id, createddate from salesforce_account limit 10
^ this query will retrieve the first 10 records from the Account object and runs relatively quickly.
but...
select id, createddate from account order by createddate desc limit 10
^ this query will download all records from the Account object then sort them in Postgres by createddate, then return the first 10 records which can take quite awhile.
Salesforce has its own 'order by' function - why not use it and let Salesforce do the lifting here?
Describe alternatives you've considered
Waiting for real simple queries like the above to execute, or even time-out if large data is present in Salesforce.
The text was updated successfully, but these errors were encountered: