SQL Timestamp offset
Posted on 2014-04-23
I have recently migrated a database to AWS. There is a timestamp on the transfer record for the system update. This used to be Australian time, but is now UTC.
I have amended the stored procedure to select on :
dateadd(hour,10,T.PayoutCheckTmStamp) between @datelow and @datehigh
This reads through all 250,000 transfers and so slow that it often times out.
I have set up an index with the PayoutCheckTmStamp, but the execution does not use this. I suspect that this is because it needs to add 10 hours to the field.