Question

I've been using SearchScope.fetchObjects() method till this time, and then it just occurred to me that fetchRows might be the better choice in some cases (when you don't need metadata like class names, object stores etc). Something tells me it might be faster, but I didn't found any arguments about what method to use in which case, and why.

Here is SearchScope documentation.

Was it helpful?

Solution

The difference in performance of fetchRows() and fetchObjects() is negligible in most cases. If you process significant volume of data and still are concerned about performance I suggest making a simple test.

The only reason for existence of fetchRows() is the possibility to query disparate object classes using JOIN.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top