Viewing 15 posts - 841 through 855 (of 2,645 total)
select t.col1, t.col2, sum(t.col3) col3, sum(t.col4) col4, col5
from (
select 7213 col1, 992 col2, 30 col3, 0 col4, cast(getdate() as date) col5
union all
select 7213 col1, 992 col2, 0...
June 25, 2021 at 3:30 pm
I can't see the point in the clustered index :
CREATE UNIQUE CLUSTERED INDEX dbo.PERSON_HISTORY__CL
ON dbo.PERSON_HISTORY ( OccurredDate, My )
...
June 21, 2021 at 9:03 am
I can't see the point in the clustered index :
CREATE UNIQUE CLUSTERED INDEX dbo.PERSON_HISTORY__CL
ON dbo.PERSON_HISTORY ( OccurredDate, My )
...
June 21, 2021 at 1:56 am
Hmm, I remember a WHERE condition on the OccurredDate; maybe I'm mixing this query up with another one.
At any rate, one last time, as I stated earlier:
the history table...
June 21, 2021 at 12:51 am
First, the history table should be clustered leading on OccurredDate. That's generally true for log tables. [Forget the stupid myth that "by default, every table should be...
June 20, 2021 at 11:21 am
First, the history table should be clustered leading on OccurredDate. That's generally true for log tables. [Forget the stupid myth that "by default, every table should be clustered on...
June 19, 2021 at 6:02 pm
any suggestions for dropping and re-creating on that large of a Table?
Not sure how much of a time window I have to do the drop\create... The Box it's on...
June 18, 2021 at 2:01 pm
Not sure what you mean by " re-cluster the Quality table".
Thanks.
I think Scott means to drop the clustered primary key on table Quality (CONSTRAINT [PK_Quality] PRIMARY KEY CLUSTERED ([Quality_ID]...
June 18, 2021 at 1:04 am
Slightly more concise way to test if a column is present:
IF COL_LENGTH(N'[dbo].[tbl_Reference]', N'ReferenceName') IS NOT NULL BEGIN
PRINT 'UPDATING [dbo].[tbl_Reference] SET ClientReferenceNumber '
...
June 15, 2021 at 2:40 pm
thanks for the suggestions, I will try these and update the results.
Can we do updates in batches? If I have total record count of 10 million than what should...
June 11, 2021 at 7:29 pm
It has a clustered index but clustered index column is not included in where clause nor in the list of columns getting updated.
Does dropping a clustered index before update...
June 11, 2021 at 1:33 pm
What columns are on the clustered index?
Do you have any other indexes on the table?
You know you could write the two update statements to be just one update statement?
June 11, 2021 at 12:53 pm
I tried that and it ran (unlike when I put the option in other parts of the code) but I still got the same error. Any ideas as to...
June 10, 2021 at 10:26 am
It would help if you could show us the queries with information on the number of rows in each table.
June 9, 2021 at 11:47 pm
Viewing 15 posts - 841 through 855 (of 2,645 total)