When using the Connect Web Services for SOAP (CWS) API is it better to use incident_get or QueryCSV?
Connect Web Services for SOAP (CWS)
From a best practice perspective it is better to do more work in each request rather than sending more requests. This will limit the number of concurrent connections to the database and help to avoid violations of "max user connections" due to system use including resources used by the API calls.
For example, consider a customization used to retrieve a list of incidents using a list of incidents ids to perform actions on all or a subset of the incidents. Rather than using incident_get to retrieve each incident individually it is better to use QueryCSV to retrieve the required information on a set of incidents in a single call. Using a list of Incident IDs to retrieve all the incidents using "incident_get" calls is very expensive. This should rather be implemented with a single QueryCSV call to fetch the fields desired from Incident with a WHERE ID IN (...) clause.
It is better to shift towards using ROQL rather than performing bulk Get API requests. This will improve system efficiency, reduce DB API errors, and will scale better as usage of the site is increased over time.