If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Regarding indexing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-21-08, 15:34
Aman Singh Aman Singh is offline
Registered User
 
Join Date: Aug 2007
Location: Mumbai,India
Posts: 13
Arrow Regarding indexing

Hi, if i have to find out what was the last time(means date and time) when indexing was done on a perticular table how can i check that.
Reply With Quote
  #2 (permalink)  
Old 04-22-08, 03:06
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
sp_helpindex <tablename>

or

select object_name(id) 'tname', name, crdate from sysindexes
Reply With Quote
  #3 (permalink)  
Old 04-22-08, 15:43
Aman Singh Aman Singh is offline
Registered User
 
Join Date: Aug 2007
Location: Mumbai,India
Posts: 13
If i run update statistics on a perticular table, then it does reindexing in the table where lots of data is added or deleted from a table.

Can i check when this was done last time. Because with Sp_helpindex <tablename> i can only check when the index was first created.

On running Sp_helpindex <tablename>, i get 2-3 years old date and time which i guess is the time the indexing was first done. As few days back Update statistics was run on the table. i wanted to check that date.
Reply With Quote
  #4 (permalink)  
Old 04-23-08, 09:35
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
Quote:
Originally Posted by Aman Singh
If i run update statistics on a perticular table, then it does reindexing
Thats not true

Maybe this will help you in the right direction

select object_name(id),moddate,colidarray
from sysstatistics
where id=object_id('tablename')

also have a look at optdiag

Last edited by pdreyer; 04-23-08 at 09:38.
Reply With Quote
  #5 (permalink)  
Old 04-23-08, 20:15
Aman Singh Aman Singh is offline
Registered User
 
Join Date: Aug 2007
Location: Mumbai,India
Posts: 13
Thanks a lot, thats exactly what i needed.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On