You need to sign in to do that
Don't have an account?
Sanket Bhosle
What will contribute to the Total number of records retrieved by SOQL queries?
Hi all,
I have the following query :
Select id, (Select Name , email from contacts where email != null), (Select name,stagename from Opportunities where stagename = 'Closed Won') from Account where id in (select accountid from contact where email!=null) and id in(select accountid from opportunity where stagename = 'Closed Won')
I wish to know if the governor limit for fetched records includes only accounts, child contacts and child opportunities or will it include the All contacts and opportunities mentioned in the where clause as well.
Thanks.
I have the following query :
Select id, (Select Name , email from contacts where email != null), (Select name,stagename from Opportunities where stagename = 'Closed Won') from Account where id in (select accountid from contact where email!=null) and id in(select accountid from opportunity where stagename = 'Closed Won')
I wish to know if the governor limit for fetched records includes only accounts, child contacts and child opportunities or will it include the All contacts and opportunities mentioned in the where clause as well.
Thanks.
Governor limit only consider parent object.
List<Account> lstAcc = [Select id, (Select Name , email from contacts where email != null), (Select name,stagename from Opportunities where stagename = 'Closed Won') from Account];
If we run below query it will consider as 1 query.
But it will count all rows means paren and child.
Ex :
An account having two contacts and one opportunity. So here rows count is 4.
Hope it helps you.
Thanks
Varaprasad