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:
CREATE INDEX tbl_result_idx_student_id ON dbo.tbl_result (student_id);
SELECT
stu.*,
(SELECT
TOP 1 +DENSE_RANK() OVER (PARTITION
BY
[tbl_result].score
ORDER BY
[tbl_result].score DESC) AS ranking
FROM
[dbo].[tbl_result]
WHERE
[dbo].[tbl_result].[student_id] = stu.[student_id]) AS Rank
FROM
[dbo].[tbl_result] stu
WHERE
stu.[student_id] = 'R135722F'