Viewing 15 posts - 3,361 through 3,375 (of 7,609 total)
You don't need to move it to another table to get it out of the main data area. Just tell SQL to force all max column(s) out of row (this...
May 30, 2018 at 2:05 pm
Not for data, that should be OK.
I'd say do not compress log files using Windows or anything external to SQL Server.
May 30, 2018 at 12:16 pm
Use method two. You could also use a view or a cte to define the SUMs to use in other calcs.
May 30, 2018 at 11:19 am
Best would be to use a bigint SEQUENCE object and get rid of the guids completely. The app can still pre-set the values as it did for guids, which was...
May 30, 2018 at 11:16 am
by what size will nvarchar(max) column get stored in LOB_DATA allocation unit?
When SQL decides it's necessary to fit the row into the page. There's no way to...
May 29, 2018 at 4:08 pm
Yep, that's not gonna work, SQL needs the sort column in the data. Here's one workaround:
SELECT MONTH, Attendance
FROM (
SELECT
DATENAME (MONTH, [Date]) AS...
May 29, 2018 at 3:26 pm
A) Yeah ... I've worked with date shifting a lot 🙂
C) Yes, we strive for performance here quite a bit. The "DATEADD" technique is only math, not text, so...
May 25, 2018 at 2:22 pm
Don't have any usable test data, but this should be close at least. [Btw, overlaying the day name was trivial, so I didn't include that.]
UPDATE...
May 25, 2018 at 10:52 am
Typically the best way to get great response time for such queries is to cluster the lookup table on the lookup keys.
Unfortunately, when the primary lookup key is a...
May 24, 2018 at 11:35 am
CREATE PROCEDURE [dbo].[ServSP_AuditAllTables_test]
AS
SET NOCOUNT ON;
INSERT INTO dbo.audit_table ( TableName, NumberOfRecords, Date )
SELECT ATL.TableName, CA1.row_count, GETDATE() AS date
FROM AllTablesList ATL
May 23, 2018 at 3:51 pm
May 23, 2018 at 10:43 am
I don't think "AVG" really has any meaning for the diff between only 2 dates?!
SELECT cust_id, DATEDiff(day,Min(visit_date),Max(visit_date))
FROM (
SELECT cust_id, visit_date
, ROW_NUMBER()...
May 23, 2018 at 10:11 am
Try forcing a MERGE join, see if that helps significantly. If it does, then go ahead and cluster the SOH table on ( IT_ID, ST_ID, DateID ). Yes, that means the rows...
May 23, 2018 at 10:04 am
Partition the clus columnstore index on that date. Then SQL can eliminate partitions with non-matching dates. I partition by month on many of our very large tables, but you might...
May 22, 2018 at 7:48 am
It's definitely possible to do. You'll most likely need an index on the table to support the lookup. You might be able to use a filtered index, but I can't...
May 21, 2018 at 2:18 pm
Viewing 15 posts - 3,361 through 3,375 (of 7,609 total)