Last post Apr 18, 2020 09:29 AM by shabbir_215
Apr 17, 2020 12:22 PM|shabbir_215|LINK
Basically i want to improve the below SQL query performance currently it take 5 sec for 109 records, the total record in actual table is 11000.
select DailyDate,ShortDate, SUM(DailyTotalCases), SUM(DailyTotalDeaths),SUM(DailyNewCases),SUM(DailyNewDeaths) from [vw_dash_ch]
GROUP BY DailyDate,ShortDate
Thanks for your help
Apr 18, 2020 12:40 AM|PaulTheSmith|LINK
Do you have an index on DailyDate,ShortDate?
CREATE INDEX ForGrouping ON vw_dash_ch (DailyDate, ShortDate)
Apr 18, 2020 07:26 AM|samwu|LINK
Basically i want to improve the below SQL query performance
As PaulTheSmith's said, you can try to use the CREATE INDEX statement to create indexes in tables.
Indexes are used to retrieve data from the database more quickly than otherwise. The users cannot see the indexes, they are just used to speed up searches/queries.
CREATE INDEX index_name
ON table_name (column1, column2, ...);
more information about the use of CREATE INDEX you can refer to this link:
Apr 18, 2020 09:29 AM|shabbir_215|LINK
Thanks i will try it