Calculation of the optimal timeout of executing a SQL query for multi ...