Showing posts with label modified. Show all posts
Showing posts with label modified. Show all posts

Monday, March 19, 2012

Index Maint Order of events...

I have a set of procedures that I have modified from
http://coolthingoftheday.blogspot.com/2007/06/sql-server-maintenance-scripts-from.html
My questions is what sequence should they be run in?
I am currently running them in the following sequence:
CHECKDB
INDEXDEFRAG
UPDATE STATISTICS
UPDATE USAGE
TIA!
DavidThat's really a matter of preference if you want to check the integrity
before or after defragging. Personally I would prefer to do it after so I
know that I have a sound db after moving all that data around.
INDEXDEFRAG
UPDATE STATISTICS
UPDATE USAGE
CHECKDB
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"David Hay" <david.hay@.gmail.com> wrote in message
news:6e483d8d-1fd8-4c9f-ab2f-727a66508692@.f3g2000hsg.googlegroups.com...
>
> I have a set of procedures that I have modified from
> http://coolthingoftheday.blogspot.com/2007/06/sql-server-maintenance-scripts-from.html
> My questions is what sequence should they be run in?
> I am currently running them in the following sequence:
> CHECKDB
> INDEXDEFRAG
> UPDATE STATISTICS
> UPDATE USAGE
> TIA!
> David

Index Maint Order of events...

I have a set of procedures that I have modified from
http://coolthingoftheday.blogspot.com/2007/06/sql-server-maintenance-scripts-from.html
My questions is what sequence should they be run in?
I am currently running them in the following sequence:
CHECKDB
INDEXDEFRAG
UPDATE STATISTICS
UPDATE USAGE
TIA!
David
That's really a matter of preference if you want to check the integrity
before or after defragging. Personally I would prefer to do it after so I
know that I have a sound db after moving all that data around.
INDEXDEFRAG
UPDATE STATISTICS
UPDATE USAGE
CHECKDB
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"David Hay" <david.hay@.gmail.com> wrote in message
news:6e483d8d-1fd8-4c9f-ab2f-727a66508692@.f3g2000hsg.googlegroups.com...
>
> I have a set of procedures that I have modified from
> http://coolthingoftheday.blogspot.com/2007/06/sql-server-maintenance-scripts-from.html
> My questions is what sequence should they be run in?
> I am currently running them in the following sequence:
> CHECKDB
> INDEXDEFRAG
> UPDATE STATISTICS
> UPDATE USAGE
> TIA!
> David

Monday, March 12, 2012

Index is not faster any more

After I have modified couple columns my database access is very slow in that table. (Update Statistics Rx_Control is in Progress). It happened before I got back to same status by restoring the data. I really don't want to restore this time. Please some one post a sloution.

Thank you
Raj SankarOriginally posted by raj_sankar
After I have modified couple columns my database access is very slow in that table. (Update Statistics Rx_Control is in Progress). It happened before I got back to same status by restoring the data. I really don't want to restore this time. Please some one post a sloution.

Thank you
Raj Sankar
Are these updates on any index columns. Try rebuilding the index using
DBCC dbreindex

Joe|||Originally posted by mkg_1232000
Are these updates on any index columns. Try rebuilding the index using
DBCC dbreindex

Joe

The index is ok, Some how execution plan changed. Now every this ok after uodating the statistics. how ever the foloowing problem remains.

from query analyser.
select * from table_name where store = '3' --is faster and using index scan.

Declare @.store as int
set @.store = '3'
select * from table_name where store = @.store --is very slow and using table scan.

I don't how to fix this, it was ok before.

Friday, February 24, 2012

Index Creation Date

Does Microsoft SQL Server keep a record of an index creation date and
last modified date in a system table somewhere?If the index is a primary key or unique constraint, then you can find
the create data in sysobjects - see sysobjects in Books Online for the
details. Otherwise, I don't think it's possible. MSSQL 2000 doesn't
store the modified date for objects, although 2005 does.

Simon|||hi
you can check for crdate in sysobjects table

just try linking sysindexes and sysobjects tables in master database. u
might get the solution

best Regards,
Chandra
http://groups.msn.com/SQLResource/
http://chanduas.blogspot.com/
------------

*** Sent via Developersdex http://www.developersdex.com ***