You need to sign in to do that
Don't have an account?
Anudeep B
Need Batch apex clarification on my queries.
I messedup with different answers of batch apex help me on this.
Please correct me below if i go wrong any where.!
/* All in case of batch apex*/
* querylocator ---- will fetch 50 million records.
* one soql query -- will fetch 50000 records.
* getquerylocator-- will fetch 10000 records.
===========================================
Please give me clarification for below.
* How many SOQL queries we can write in a single Batc Apex Class.?
* If we can use more than one SOQLs, can we write on different Objects in the same Batch Apex class.?
* Can SOQL query write in all the methods.(start(), execute(), finish()).?
Give me clarification on this points, i am confused on these things, even shortly or with explanation.
Thanks.
Please correct me below if i go wrong any where.!
/* All in case of batch apex*/
* querylocator ---- will fetch 50 million records.
* one soql query -- will fetch 50000 records.
* getquerylocator-- will fetch 10000 records.
===========================================
Please give me clarification for below.
* How many SOQL queries we can write in a single Batc Apex Class.?
* If we can use more than one SOQLs, can we write on different Objects in the same Batch Apex class.?
* Can SOQL query write in all the methods.(start(), execute(), finish()).?
Give me clarification on this points, i am confused on these things, even shortly or with explanation.
Thanks.
You can wirte 100 SOQL queries in single batch chunk (execute method of Batch).
* If we can use more than one SOQLs, can we write on different Objects in the same Batch Apex class.?
In execute method there is no restriv=ction ob object referenced in different queries. But all queries must no return records more than 50000
* Can SOQL query write in all the methods.(start(), execute(), finish()).?
In start() method batch query is written only. It can only be one object at a time. Chunks [execute()] of batch decided by start() method. In execute() and finish() you can write as many queries come under apex governor limit.
i have 70000 records in an object, i want to do batch apex. so a single SOQL query will retirve 50000 records, how to get remaining 20000 records in a same batch apex class..?