Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Index Optimization for accidental DBA

$
0
0

Hi - I apologize if this has been asked in another forum post but I am really confused and was hoping to get some personalized help regarding indexes on a large SQL server table I have.  The table has 14,253,266 rows.  On average, the table gets about 3.5 million rows added on a monthly basis.  No updates are made, just inserts and sometimes deletes.  There are 71 columns, and I generally run queries grouping on two fields: Period and Country.  So I have created a clustered index on the table on those two columns.  But just running a simple count(*) on the table takes 49 seconds.  To give this perspective, I can run a count(*) statement in another db with 15 million records and the result comes back in less than a second.  

So my question(s) are:

-How can I be sure I have set up my index correctly?  

-Do I need to rebuild the index on a regular basis?

-Any other suggestions (please keep in mind that I am an "accidental" DBA so all I have learned about indexes so far has been reading online, but I'm just stuck at this point because most articles are just too technical for me)

Any help or suggestions are greatly appreciated!

Thanks!


Jenna G


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>