in general SQL would be faster however there are of course exceptions