Viewing 15 posts - 4,606 through 4,620 (of 7,619 total)
I've adjusted the spreadsheet you originally posted to have both missing index and index usage stats. That is the minimum info needed to analyze indexes. I've pulled 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".
November 30, 2015 at 8:56 am
This may be more efficient (most people use LEFT rather than RIGHT join, so I switched it to that):
SELECT l.value, p.productname
FROM dbo.ProductTable p
LEFT OUTER JOIN (
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".
November 27, 2015 at 2:08 pm
Re1 (11/27/2015)
tbl_documents table is having 700 rows and tbl_documentdetails table is having 1.6 millions+ rows.
I have created index on tbl_documentdetails table on invoiceid,orderid,billid column as per sequence used in join...
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".
November 27, 2015 at 10:34 am
This isn't really all that complex, and we can use code that doesn't require any specific date setting(s). I used a CROSS APPLY just to get the date calc...
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".
November 27, 2015 at 10:25 am
Welsh Corgi (11/26/2015)
I'm looking to partition by year.
My current archive code looks up the year in a lookup table.
I want to mimic that logic...
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".
November 27, 2015 at 8:06 am
Welsh Corgi (11/25/2015)
Scott,Please see attach Excel file.
Unfortunately I had a hard time interpreting what you were telling me to do.
Thank you for all of your you help.
Hmm, in the spreadsheet...
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".
November 27, 2015 at 8:03 am
Sergiy (11/25/2015)
Welsh Corgi (11/25/2015)
Scott,Please see attach Excel file.
Unfortunately I had a hard time interpreting what you were telling me to do.
Thank you for all of your you help.
The stats look...
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".
November 27, 2015 at 8:02 am
Sergiy (11/25/2015)
Welsh Corgi (11/25/2015)
CREATE TABLE [dbo].[xactControlPoint](
[xactControlPointID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[xactControlPointTypeID] [int] NOT NULL,
[call_id] [int] NOT NULL,
[contr_id] [int] NULL,
[xactTransactionIDValue] [varchar](50) NULL,
[beginDate]...
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".
November 27, 2015 at 7:46 am
It depends. In this case, I don't see begin date being queried, so I'd be very leery of starting the clustered index with that column. Is begin date...
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".
November 25, 2015 at 12:49 pm
Rushing this process more than normal right now, very busy on top of holiday fast approaching :-).
Hopefully this helps a little more:
Chg1) Add column contr_id as an INCLUDEd column on...
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".
November 25, 2015 at 12:14 pm
It is a lot easier if you use a spreadsheet to hold the stats so the columns stay intact ;-). But I've read these so much I can read...
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".
November 25, 2015 at 11:39 am
Welsh Corgi (11/25/2015)
CREATE TABLE [dbo].[xactControlPoint](
[xactControlPointID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[xactControlPointTypeID] [int] NOT NULL,
[call_id] [int] NOT NULL,
[contr_id] [int] NULL,
[xactTransactionIDValue] [varchar](50) NULL,
[beginDate] [datetime]...
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".
November 25, 2015 at 9:40 am
Sergiy (11/24/2015)
Welsh Corgi (11/24/2015)
I can easily archive the tables without running into the risk of having to tune...
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".
November 25, 2015 at 9:11 am
For us, most tables don't really need partitioned. Archiving and partitioned views handles most of them.
When I do partition, I align indexes because I want to be able 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".
November 24, 2015 at 4:40 pm
You could always archive old data first, then adjust the indexes as needed. But be sure to capture all index stats (missing, usage and operation) now before you delete...
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".
November 24, 2015 at 3:24 pm
Viewing 15 posts - 4,606 through 4,620 (of 7,619 total)