Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12554

Scary Table

$
0
0

Hi Everybody,

I hope you will guide me in suggesting the possible way to tune this table.

Here is my scary table which holds Members Tracking History. Total number of records 8M.

Basically, this table will keeps track of all our club members activity like startdate,enddate,deceased date, emailaddresses etc.. apprx 30 columns. Default value for the [enddate] is 1\1\1900 00:00:000. So this is the column which is used by our developers to track the Current Active Member by putting 

(StartDate <= GETDATE()) AND ((EndDate = '1900-01-01') OR (EndDate >= GETDATE())

This filter is everywhere in our existing code which is making lot of IO issues. There are currently 5M active members ( means either enddate is '1\1\1900' or > Getdate())  So is there any other alternative to track the Active Persons without this filter. It got an index on this column which is not being used -- I totally understood why?

Would there is any alternate to fix this task? Like flag to measure the active Mem

I am thinking of Partitioning the active mem into separate filegroup - which i didn't test yet?

Please chime in if you have any thoughts..

Thanks.


Viewing all articles
Browse latest Browse all 12554

Trending Articles



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