Viewing 15 posts - 196 through 210 (of 7,613 total)
You don't actually have to drop both indexes. You would, for example, often drop one index and modify the other one.
I've started on code to do this process...
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".
May 13, 2024 at 6:12 pm
For all indexes, or the 1 you tell it to generate (either by index number OR by index name).
As I said, I've been designing code to do my index checking...
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".
May 13, 2024 at 2:54 pm
You don't actually have to drop both indexes. You would, for example, often drop one index and modify the other one.
I've started on code to do this process but have...
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".
May 13, 2024 at 2:44 pm
Actually, partitioning came sometimes accidentally (or coincidentally) help performance. For example, the data was originally clustered by id, but to partition you cluster it first by a date. IF you...
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".
May 10, 2024 at 2:57 pm
Remove the second column from the first IN subquery:
SELECT minutes FROM dbo.timeaccountmovement WHERE ownertype = 1 AND timeaccountid = 8 AND ownerid IN
(
SELECT ownerid FROM dbo.timeaccountmovement WHERE timeaccountid = 73...
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".
May 9, 2024 at 7:41 pm
Yes, I've used CDC. I ended up creating my own proc to view change data (basically pre-prepping the params for the MS proc) because the MS proc itself is so...
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".
April 25, 2024 at 5:17 pm
I see "emp." being referenced, but I don't see "emp" anywhere in the supplied query.
You would have to check each of the joined tables to see if there is an...
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".
April 24, 2024 at 8:01 pm
You don't really need to partition, assuming you re-cluster, although you could. What will happen is that you will partition on date, so you will have to add date 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".
April 22, 2024 at 1:26 pm
If avol is actually numeric. If it's varchar, could be an issue.
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".
April 21, 2024 at 5:49 pm
Cluster both tables by ( StartDateTime, ID ) rather than just ID. Then, since you'll be moving data in cluster key order, you can just use a standard copy-then-delete approach.
Btw,...
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".
April 21, 2024 at 5:47 pm
Another possibility is, assuming that:
(1) column avol was NULL before this UPDATE
(2) your server still has the default FILLFACTOR 0f 0 (=100)
Then this UPDATE could a lot of leaf page...
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".
April 20, 2024 at 5:20 am
You *might* also want some background process to remove carts after a certain period of time, or maybe not. For example, I can go into Amazon, put something in my...
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".
April 16, 2024 at 6:17 pm
Creating and dropping tables is significant overhead. You'd be much better of, as others have noted, with a permanent table. You could key rows in that table by user id...
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".
April 16, 2024 at 2:42 pm
Just use a method that works under any/all DATEFIRST settings, much simpler and safer:
/* calc immediately previous Sunday; day 0 = Monday, so day 6 = Sunday...
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".
April 15, 2024 at 1:22 pm
With 20 name columns, how do you verify that all the names are unique across all rows? And, if they're not unique, how do you know which id to assign...
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".
April 11, 2024 at 2:33 pm
Viewing 15 posts - 196 through 210 (of 7,613 total)