I have a table with 1.5 million rows, it's a parent table with 12 child tables.
Even for a simple count query, it is taking hours to complete.
select count(1)
from table
where col_filter >= 'number'
table
contains 40 columns and col_filter
is defined as a varchar
datatype. col_filter
is not indexed.
Questions:
- What should I check to find the potential issues with my table setup?
- I am using Microsoft SQL Server Management Studio 18, is there any tool that I can use to understand and get some recommendations to optimize the performance?
- If indexing is the solution, is it possible to calculate how much extra space the index creation will occupy?
Any suggestions would be really appreciated.