Viewing 15 posts - 1,996 through 2,010 (of 7,619 total)
Good observations. The view, like this query, is a mess. It joins 7 tables, including one in a database on another server with a different collation, and another view....
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 6, 2021 at 5:45 pm
Can you post the query for the view being referenced? At least I'm assuming that "vwRequests" is a view. I can't tell what indexes might help this query without seeing...
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 6, 2021 at 12:01 am
cast(
case f.HAI
when 'A' then (isnull(f.NUM,0)/f.DEN) *10000.00
when 'B' then (isnull(f.NUM,0)/f.den) *1000.00
when 'C' then (isnull(f.NUM,0)/f.den) *1000.00
when 'D' then (isnull(f.NUM,0)/f.den) *1000.00
when 'E' then (f.NUM/f.den) *100.00
else 0.00
end as decimal(9, 2)) as 'Rate'
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 5, 2021 at 6:24 pm
If you're joining to the table, and it currently has no indexes at all, then create a clustered index on the WHERE columns and/or JOIN column(s).
To give you anything more...
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 5, 2021 at 3:23 pm
Please be aware that this is forum for SQL Server dbms. Your code is obviously for a different dbms. You might get a better response if you post on a...
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 5, 2021 at 12:43 am
Yes, sorry, as I stated in passing earlier, what I meant was that you "can't" in practice even if you can in theory because it takes so long...
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 5, 2021 at 12:30 am
However, if you "don't break the log chain", and something happens after the rebuilds, you WILL lose all data mods after the rebuilds, since you can't forward-recover using...
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 4, 2021 at 9:48 pm
Not a lot of details to go on, so I'll have to assume that the time is the same for the two rows that need brought together.
SELECT...
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 4, 2021 at 7:24 pm
p.s. Just in case there's a question about where I stand on this, I DO absolutely agree that taking a dif backup before and after Minimally logged rebuild 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".
January 4, 2021 at 5:15 pm
That's not true, Scott. Not that you should but you can go back to the FULL Recovery Model from the BULK_LOGGED recovery model at any time without any kind...
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 4, 2021 at 4:59 pm
Again, though... they don't need to be full backups. They can be diffs to save some time and, possibly, reduce the size of backups.
If you intend to go back...
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 4, 2021 at 3:04 pm
Obscure objection. If there's corruption, you can't restore using your method. You can't restore to the middle of the rebuild process. Rebuild is atomic -- it works or...
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 4, 2021 at 1:03 am
We differ in opinion only on whether or not using the Bulk Logged or Simple Recovery Model would be a "Pyrrhic victory" victory or not. I'm simply not...
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, 2021 at 6:59 am
That's not true, Scott. The log can be applied. You just have to use the whole thing. You can't stop in the middle for a PIT restore. If something...
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 2, 2021 at 6:39 am
Even if the db is not normally in SIMPLE mode, you would certainly want it to be in SIMPLE for these rebuilds, to drastically reduce logging...
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 1, 2021 at 9:14 pm
Viewing 15 posts - 1,996 through 2,010 (of 7,619 total)