Viewing 15 posts - 1,081 through 1,095 (of 7,619 total)
CONCAT is not a safe way to do this because different values could appear to be the same.
Do all the columns have to match? Or just some?
For now, I'll assume...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
January 3, 2022 at 9:55 pm
There could be a lot of different reasons for latency. Did this just start recently? Here are some possible things; (1) should be done first, the others are in no...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
January 3, 2022 at 4:53 pm
We need to see the DDL for Clicks2 and Clicks3 as well. Particularly if those tables are not clustered uniquely on ClickID, the MERGE join could be less efficient.
As Jeffrey...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 28, 2021 at 9:23 pm
For efficiency, you should really just scan the table once to count all columns, as the code generated below does. I've added the view name as input so the code...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 27, 2021 at 6:50 pm
My favorite lie is that NOLOCK improves performance.
Of course it must vs taking locks.
"and use snapshot isolation." MEGA-HUGE overhead. SI should...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 8:53 pm
My favorite lie is that NOLOCK improves performance.
Of course it must vs taking locks.
"and use snapshot isolation." MEGA-HUGE overhead. SI should only be...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 6:48 pm
My favorite lie is that NOLOCK improves performance.
Of course it must vs taking locks.
"and use snapshot isolation." MEGA-HUGE overhead. SI should only be used when...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 5:14 pm
"Switching to alphanumeric" from what? Int, bigint? If so, have you used negative numbers yet? Typically the quick-and-dirty way to stretch values is to use the full range of negative numbers. ...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 4:41 pm
And, in never changing historical data, this is read only. Use a read only connection, and use snapshot isolation.
You can't use a "read-only connection" in/for a proc that does...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 4:39 pm
My favorite lie is that NOLOCK improves performance.
Of course it must vs taking locks.
"and use snapshot isolation." MEGA-HUGE overhead. SI should only be used when truly necessary.
You need to...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 4:22 pm
Yes, agree that it would benefit in the read loads. But we should also consider the overhead of CI on write operations. So if the database...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 3:54 pm
It really depends on whether you understand the consequences of NOLOCK. It can result in a 'dirty read' if there are uncomitted transactions in the database that...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 3:49 pm
Yes, agree that it would benefit in the read loads. But we should also consider the overhead of CI on write operations. So if the database...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 22, 2021 at 3:38 pm
Yes, agree that it would benefit in the read loads. But we should also consider the overhead of CI on write operations. So if the database is read-intensive...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 21, 2021 at 7:30 pm
It really depends on whether you understand the consequences of NOLOCK. It can result in a 'dirty read' if there are uncomitted transactions in the database that affect the...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
December 21, 2021 at 7:02 pm
Viewing 15 posts - 1,081 through 1,095 (of 7,619 total)