Viewing 15 posts - 4,126 through 4,140 (of 7,619 total)
thomashohner (9/30/2016)
WOW, you have to be joking. 14 seconds row count on the money. Attached is the execution plan.Thank you both so very much. Holy molly :-D:-D
Great, glad it...
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".
September 30, 2016 at 1:36 pm
Try this:
...
Ethnicity,
MaritalStatus,
...
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".
September 30, 2016 at 12:00 pm
In this case, I think it's ok to add the current status to the Orders table, using an efficient, well-written trigger to maintain the status.
However, the lookup of the current...
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".
September 30, 2016 at 11:28 am
I can't see any of the indexes, but perhaps you can combine the Lists lookups as below.
Also, you'll probably get best performance by clustering the Lists table by ( Databasekey,...
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".
September 30, 2016 at 11:21 am
ramana3327 (9/30/2016)
Will there any performance impact by reducing the mdf file size?
Probably not, if the space was never used.
The way to try to shrink with no fragmentation is to use...
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".
September 30, 2016 at 11:00 am
Several things to consider here. I'll number them so that everyone can comment on them more easily:
1) Make sure IFI is on (just in case).
2) Pre-allocate additional space in...
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".
September 29, 2016 at 1:02 pm
Sample dynamic SQL:
DECLARE @MySprocParam VARCHAR(50) = 'TestAlias'
EXEC('SELECT ''ASDF'' AS [' + @MySprocParam + ']')
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".
September 29, 2016 at 12:48 pm
Eric M Russell (9/28/2016)
ScottPletcher (9/28/2016)
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".
September 28, 2016 at 2:54 pm
You'd still need to keep at least the history from the previous check, because an index/table could be dropped, which would remove it from the system views.
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".
September 28, 2016 at 1:53 pm
Option (1) should be fine as long as the trigger is efficiently written and there is an index to support the trigger's query. For example, if the table is...
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".
September 28, 2016 at 12:56 pm
USE HandsOnOne;
SELECT c.CustomerName, a.City, a.State
FROM Customer c
INNER JOIN Address a
ON a.AddressID = c.CustomerAddressID
ORDER BY a.ZipCode ASC, c.CustomerName ASC;
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".
September 28, 2016 at 12:48 pm
You could populate a table with the test values you want to us, then process from it in a loop or by using GO <#_of_test_runs>, which I used below just...
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".
September 28, 2016 at 12:42 pm
The irony is it might be more overhead to check for the updates than to just do the log transfers.
In theory you might (should?) be able to use sys.dm_db_index_operational_stats 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".
September 28, 2016 at 12:30 pm
I suggest using a CASE technique to add the desired matches because that method gives you great flexibility on specifically what values to match. The code is somewhat longer,...
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".
September 28, 2016 at 12:21 pm
Lynn Pettis (9/27/2016)
ScottPletcher (9/27/2016)
Talib123 (9/27/2016)
I'm a production DBA
... how do I get my T-sql skills to a developer\Report writer level.
So you want to go from DBA-level SQL to developer-level SQL:
Destroy...
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".
September 27, 2016 at 2:01 pm
Viewing 15 posts - 4,126 through 4,140 (of 7,619 total)