You need to sign in to do that
Don't have an account?
oneday
what does 'limit' keyword do in a query
If I use the 'limit' keyword in the query string as "Select Id from Account where Name='test' limit 1", will the query operation return immediately once it found a matched Account?
I am asking this because I would like to know if the query could be more efficient if I used the 'limit' keyword.
All Answers
Take a look at the docs:
http://www.salesforce.com/us/developer/docs/api90/Content/sforce_api_calls_soql_select.htm#i1422156
They don´t necesarily explain how it works in technical terms (ie: does it grab all records but only returns the first one?) but if you want to limit the number of rows returned in SOQL this seems the optimal way to do it.
J