+ Start a Discussion
MohanaGopalMohanaGopal 

SOQL

What is the difference between synchronous call and asynchronous call in a soql query.. Which one is best...
werewolfwerewolf
An asynchronous call (I presume you mean using the AJAX toolkit) allows the browser to continue processing Javascript code while it's waiting for the query results to return.  A synchronous call stops all Javascript in its tracks until the query results return.

If you need your code execution to stop, i.e. it can't do anything useful until the query results are in, then use a synchronous call.  Otherwise use an asynchronous call, which makes for a more fluid user experience.