In case you have your own slow SQL query, you can optimize it automatically here.
For the query above, the following recommendations will be helpful as part of the SQL tuning process.
You'll find 3 sections below:
SELECT
numbers.n,
substr(CbahiHSSpecialtyUnits.units,
numbers.n,
1)
FROM
numbers
INNER JOIN
CbahiHSSpecialtyUnits
ON LENGTH(CbahiHSSpecialtyUnits.units) - LENGTH(REPLACE(CbahiHSSpecialtyUnits.units,
',',
'')) >= numbers.n - 1
WHERE
HsSubStandardID = 22
AND SpecialtyID = 2
AND numbers.n > 0
ORDER BY
numbers.n