10.02.2017, 09:49
Don't use row_count if you only want to count something! That is terribly inefficient because it sends over the entire result set. Use the COUNT() aggregate function instead and then fetch the result like you would any regular integer variable.