SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Index Management


Index Management

Author
Message
Ahmad Osama
Ahmad Osama
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2299 Visits: 1660
Comments posted to this topic are about the item Index Management

Regards,
Sqlfrenzy
jay.peri
jay.peri
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 23
technically very good document. please continue do more research on locks also.
darwin.maramot
darwin.maramot
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 39
hi am kinda new here

can this be apllied on SQL 2000?

thanks!
dagfinn
dagfinn
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 498
The code posted contains a lot of errors. Misspelled procedure names, missing columns, wrong aliases.

I don't have time to do the error checking right now, but will post my findings/corrections later today (if it is not done by then...)
Ahmad Osama
Ahmad Osama
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2299 Visits: 1660
darwin.maramot (10/20/2009)
hi am kinda new here

can this be apllied on SQL 2000?

thanks!


No..It doesn't applies to sql 2000

Regards,
Sqlfrenzy
Ahmad Osama
Ahmad Osama
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2299 Visits: 1660
dagfinn.molde (10/20/2009)
The code posted contains a lot of errors. Misspelled procedure names, missing columns, wrong aliases.

I don't have time to do the error checking right now, but will post my findings/corrections later today (if it is not done by then...)


thanks..I will review and update asap...

Regards,
Sqlfrenzy
darwin.maramot
darwin.maramot
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 39
Sqlfrenzy (10/20/2009)
darwin.maramot (10/20/2009)
hi am kinda new here

can this be apllied on SQL 2000?

thanks!


No..It doesn't applies to sql 2000


ok thanks!
ChiragNS
ChiragNS
SSCarpal Tunnel
SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)SSCarpal Tunnel (5K reputation)

Group: General Forum Members
Points: 4991 Visits: 1865
nice article

"Keep Trying"
Benn Sugden-373263
Benn Sugden-373263
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 9
Code posted is very inconsistent.
Uppercase, lowercase, schema names missing.
Prefixes are inconsistent - sometimes "Uf_", othertimes "fn_"

select * is naughty unless you need the full result set...
When using the "EXISTS" keyword you can simply "SELECT 1 WHERE ...."
norbert.heyermeyer
norbert.heyermeyer
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 7
When trying to bring your functions to 'life', I changed the proc_FilltblIndexUsageInfo


ALTER Proc [dbo].[proc_FilltblIndexUsageInfo]
AS
Begin
Truncate table tblIndexUsageInfo
insert into tblIndexUsageInfo
select db_name(db_id()) DbName,
so.name as 'TableName',
ISNULL(si.name,'No Index') as IndexName,
si.index_id,
Case When is_primary_key=1 then 'Primary Key Constraint'
Else 'Index' End ConstraintType,
si.type_desc,
dbo.Uf_GetIndexCol(si.index_id,so.object_id,0) As IndexKeyColumn,
dbo.Uf_GetIndexCol(si.index_id,so.object_id,1) As IncludedCols,
spi.user_seeks,spi.user_scans,spi.user_lookups,spi.user_updates,
(user_seeks+user_scans+user_lookups+user_updates) as 'IndexUsage ',
dbo.Uf_GetIndexSize(si.index_id,so.object_id) 'IndexSizeKB',
Cast(
(user_seeks+user_scans+user_lookups+user_updates)/
dbo.Uf_GetIndexSize(si.index_id,so.object_id) As decimal(10,2))
As IndexUsagetoSizeRatio
from sys.objects so inner join sys.indexes si
on so.object_id=si.Object_id
inner join sys.dm_db_index_usage_stats spi
on spi.Object_id=so.Object_id
and si.index_id=spi.index_id
and spi.database_id=db_id()
where so.type='u'
END


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search