Viewing 15 posts - 3,241 through 3,255 (of 7,609 total)
set statistics io,time off
DROP TABLE latestrecords ;
GO
CREATE TABLE latestrecords
(
Id int,
Email varchar(200),
Customer_FirstName varchar(200),
Status varchar(200),
RecordTimestamp DATETIME
)
GO
July 24, 2018 at 1:22 pm
July 24, 2018 at 12:53 pm
July 24, 2018 at 12:42 pm
July 24, 2018 at 11:32 am
July 24, 2018 at 11:17 am
The imperfect index definition is a drag on the first query, requiring a sort of all rows. Correcting the index definition:
DROP INDEX IX_latestrecords_1 ON latestrecords;
CREATE UNIQUE INDEX...
July 24, 2018 at 10:50 am
Not enough details to get specific, but in very general terms, I would likely go with a new option.
Keep the existing tables to do the current logging, but...
July 23, 2018 at 2:21 pm
Consider using system views such as sys.dm_db_index_operational_stats. Presumably you know at least the db(s) in which the code operates, although hopefully object names as well (or at least most...
July 20, 2018 at 8:02 am
Wouldn't you want to do that the other way? That is, find rows where the previous row matches the next row -- i.e. no column changed -- so you could...
July 20, 2018 at 7:54 am
Use MS's free tool "tablediff.exe" and let them do this work for you, and fully tested already! Unfortunately quirky to get working initially, but works well after that, and it's...
July 18, 2018 at 12:19 pm
I didn't have any data to test with, but I'm reasonably sure my sort order is correct. As I think you've since discovered, the rows get out of order outside...
July 18, 2018 at 10:44 am
;WITH cte_EarliestShowDates AS (
SELECT Show, MIN(Date) AS EarliestShowDate
FROM dbo.TableName
GROUP BY Show
)
SELECT TN.*
FROM dbo.TableName TN
INNER JOIN cte_EarliestShowDates CESD...
July 17, 2018 at 3:01 pm
July 17, 2018 at 12:54 pm
Viewing 15 posts - 3,241 through 3,255 (of 7,609 total)