March 19, 2009 at 10:17 am
GilaMonster (3/19/2009)
Krishna (3/19/2009)
GilaMonster (3/19/2009)
My criteria for clustered indexes - narrow, unchanging, unique, ever-increasing.That's a good one Gail. Explains everything just in 4 words.:-D
I can't take credit. Kimberly Tripp[/url]'s been preaching that for years
haha yes, that's true. the beauty is you are being honest. Kimberley Tripp's 'The Clustered Index Debate' is very interesting.
March 19, 2009 at 10:21 am
the table looks like this:
CREATE TABLE [Mt_Anag]
(
[Anag_Id] [uniqueidentifier] NOT NULL,
[Cedacri] [bigint] NOT NULL,
[Ruo_Id] [uniqueidentifier] NOT NULL,
[Niu_Id] [uniqueidentifier] NOT NULL,
[Data_Censimento_Host] [datetime] NULL,
[Stato_Censimento_Host] [tinyint] NULL,
[Note] [text] NULL,
[User_Id_Last] [uniqueidentifier] NOT NULL CONSTRAINT [DF_Mt_Anag_User_Id_Last] NOT NULL,
[Datasys_Last] [datetime] NOT NULL CONSTRAINT [DF_Mt_Anag_Datasys_Last] DEFAULT (getdate()),
[Nota_Status] [varchar](19) COLLATE Latin1_General_CI_AS NULL,
[Status_Cliente] [char](1) COLLATE Latin1_General_CI_AS NULL,
[Affidato] [char](1) COLLATE Latin1_General_CI_AS NULL,
[Garantito] [char](1) COLLATE Latin1_General_CI_AS NULL,
[Eurisc_Codice] [varchar](20) COLLATE Latin1_General_CI_AS NULL,
[Eurisc_Data] [datetime] NULL,
[Convenzione_Id] [uniqueidentifier] NULL,
[Campagna_Id] [uniqueidentifier] NULL,
[Target_Id] [uniqueidentifier] NULL,
[FromEngine] [bit] NULL CONSTRAINT [DF_Mt_Anag_FromEngine] DEFAULT ((0)),
[CapoReteNdg] [bigint] NULL,
[Azienda] [bit] NULL,
[CheckCeRi] [bit] NULL,
[CheckProtestiPreg] [tinyint] NULL,
[CheckAntifrode] [bit] NULL,
[CheckSchedaSoci] [bit] NULL,
[CheckSchedaPart] [bit] NULL,
[CheckVisure] [bit] NULL,
[CheckEurisc] [bit] NULL
)
While searching some code for a sample I've seen that cedacri is returned most of the time, used as a filter couple of times, few...so I think using it as a column for index is not a good idea.
Anag_Id is a referenced by tables where [Ruo_Id] and [Niu_Id]are pk, and used in other queries as a filter.I think the difference is obvious...that is better to use Anag_Id....
March 23, 2009 at 4:59 pm
GilaMonster (3/19/2009)
Krishna (3/19/2009)
GilaMonster (3/19/2009)
My criteria for clustered indexes - narrow, unchanging, unique, ever-increasing.That's a good one Gail. Explains everything just in 4 words.:-D
I can't take credit. Kimberly Tripp[/url]'s been preaching that for years
Just wanted to say thanks for this, great link, learnt a lot. Thanks guys.
Other readers, please take Gails recomendation, Kimberly's blog is top quality.
.
March 23, 2009 at 5:04 pm
Tim Walker (3/23/2009)
GilaMonster (3/19/2009)
Krishna (3/19/2009)
GilaMonster (3/19/2009)
My criteria for clustered indexes - narrow, unchanging, unique, ever-increasing.That's a good one Gail. Explains everything just in 4 words.:-D
I can't take credit. Kimberly Tripp[/url]'s been preaching that for years
Just wanted to say thanks for this, great link, learnt a lot. Thanks guys.
Other readers, please take Gails recomendation, Kimberly's blog is top quality.
Check out PAul Randal's too for data corruption and other things....and both of their blogs for Transaction log maintenance.
Viewing 4 posts - 61 through 63 (of 63 total)
You must be logged in to reply to this topic. Login to reply