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 table1_idx_label ON Table1 (Label);
SELECT
T1.Label,
STUFF((SELECT
', ' + CAST(T.Value AS VARCHAR) + ',"' + T.ColorCODE + '"'
FROM
Table1 T
WHERE
T.Label = T.Label
ORDER BY
T.Label FOR XML PATH('')),
1,
2,
'') AS Data
FROM
Table1 T1
GROUP BY
T1.Label
ORDER BY
T1.Label