[SalesForce] Governor Limit on number of child records fetched

A SOQL query can return a maximum of 50,000 records, is there any limit on the number of child records that can be fetched in a SOQL query.

Example, I have an Account name as 'DBZ' having more than 50,000 contacts. So will below query can hit any governor limit ?

List<Account> acc_Contacts = [Select name, (Select id, name from Contacts) from Account where name = 'DBZ']

Since i am having a developer edition org, i cant check it myself for this amount of data.

Best Answer

Yes it will because the 50,000 record count in single transaction.

As per Execution Governors and Limits:

In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. These types of queries have a limit of three times the number for top-level queries. The row counts from these relationship queries contribute to the row counts of the overall code execution.