August 6, 2014 at 8:50 am
Hi there,
I am designing a database to store data from a leak tester.
We want to display the results between dates, I mean, the results of the leaking test are going to be stored as well as the datetime in which they have been performed.
ID (int)
RESULT (float)
TS (datetime)
The query will be, of course:
SELECT * FROM TABLE Where TS BETWEEN DT1 and DT2
This table is growing by 10000 rows a day, it is possible that in a year getting the values between two dates became impossible.
Using a index with a datetime field sounds like a crazy idea, maybe i am wrong anyway.
Thank you for your ideas.
Have a great day.
August 6, 2014 at 9:08 am
I'm not sure what your question is, but a date column is often a great candidate for an index - even a clustered index. You'll want to weigh the benefit you get from having the index against the cost of maintaining it. So if you're writing to it 10000 times a day, but only querying it once a day, it may not be worth it.
John
August 8, 2014 at 3:46 am
Hi,
is it possible to redisign your leak tester ?
supposed the leak tester reports 10.000 times the same result (per day)
it might be more advantageous only to store the differences.
What is the gab between DT1 and DT2 ?
DATETIME values are a good candidate for partitioning a table
and so on....
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply