Viewing 15 posts - 466 through 480 (of 7,597 total)
Since you're only doing INSERT and not UPDATE, you don't need MERGE.
I really can't follow the different tables you have since there's only one source table for all the columns...
March 30, 2023 at 7:16 pm
You'll need to CAST any text column(s) to varchar(max) in the PARTITION BY.
March 30, 2023 at 3:13 pm
;WITH cte_count_dups AS (
SELECT
*, COUNT(*) OVER(PARTITION BY Nationalnumber, Birthdate, Mobilphone, Emailaddress, Firstname) AS dup_count
...
March 30, 2023 at 3:07 pm
Not a lot of details. Maybe something like this:
SELECT
NationalNumber
FROM Contact
GROUP BY NationalNumber
HAVING /*COUNT(*) > 1 AND*/
((COUNT(DISTINCT Birthdate) >...
March 30, 2023 at 12:50 pm
You can't include any columns in a clustered index (by definition it automatically includes all columns in the table anyway).
Just use the key column(s) you need. It's OK, and often...
March 29, 2023 at 2:32 pm
The DBA's right about the concurrency issue. Also, you should really only create a clustered index on a temp table and it should be created before the table...
March 28, 2023 at 2:11 pm
The DBA's right about the concurrency issue. Also, you should really only create a clustered index on a temp table and it should be created before the table is loaded.
You...
March 28, 2023 at 2:03 pm
You can reference a temp table in dynamic SQL. Could you create a temp table and load it instead?
March 28, 2023 at 1:57 pm
SELECT j.name AS running_job_name,
DATEDIFF(MINUTE, ja.start_execution_date, GETDATE()) AS duration_mins,
ja.*
FROM msdb.dbo.sysjobactivity ja
INNER JOIN msdb.dbo.sysjobs j ON j.job_id = ja.job_id
WHERE...
March 27, 2023 at 2:28 pm
> Two synchronous replica in one region <<
The prod server must wait for the replicas to be in sync. That could also be adding to delay in prod.
March 20, 2023 at 6:39 pm
Typically you create only the clustered index prior to load, and any non-clustered indexes after the load. That's generally the best-performing approach, although theoretically it could be different for a...
March 17, 2023 at 2:39 pm
It's 16 Gb. My laptop from 10-11 years ago had double that amount of ram. My phone from 2010ish with its 480x800 resolution screen had that amount...
March 17, 2023 at 4:43 am
It's 16 Gb. My laptop from 10-11 years ago had double that amount of ram. My phone from 2010ish with its 480x800 resolution screen had that amount...
March 17, 2023 at 4:41 am
It's 16 Gb. My laptop from 10-11 years ago had double that amount of ram. My phone from 2010ish with its 480x800 resolution screen had that amount of storage.
Maybe...
March 16, 2023 at 9:38 pm
A PK is not necessarily an irrelevant cost. If I have 2B rows, for example, the "free" PK costs me at least 16GB of row and storage space.
Some tables simply...
March 16, 2023 at 7:47 pm
Viewing 15 posts - 466 through 480 (of 7,597 total)