Following benchmark results, based on the optimization you suggested on the IN syntax, which diminishes greatly the lenght of the SQL select command, the string function as is performs better than the stringbuilder. I will keep this conversion for longer string if I ever need to apply the same later on. But, for now, this was the best part to optimize.