dbTalk Databases Forums  

index size

comp.databases.sybase comp.databases.sybase


Discuss index size in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lalit
 
Posts: n/a

Default index size - 01-13-2004 , 11:06 AM






Hi Friends,

I want to build a query which will give me the output like that:-

Table size indid

Table1 234455K 0
Index1 2323K 3
Cl_index 232323K 1

In short I want to pick up all the rows from sysindexes
a. where id > 100
and Size of each table ,clustered index, nonclustered index.

I know we have only one procedure sp_spaceused which will give you the size
but that cann't help when you are writing a query.
Kindly suggest any query or scripting

Regards

Reply With Quote
  #2  
Old   
Bret Halford
 
Posts: n/a

Default Re: index size - 01-13-2004 , 05:57 PM






issues_sybase (AT) hotmail (DOT) com (Lalit) wrote in message news:<7bcd3933.0401130906.456db21f (AT) posting (DOT) google.com>...
Quote:
Hi Friends,

I want to build a query which will give me the output like that:-

Table size indid

Table1 234455K 0
Index1 2323K 3
Cl_index 232323K 1

In short I want to pick up all the rows from sysindexes
a. where id > 100
and Size of each table ,clustered index, nonclustered index.

I know we have only one procedure sp_spaceused which will give you the size
but that cann't help when you are writing a query.
Kindly suggest any query or scripting

Regards

It can certainly help if you look at the sourcecode for sp_spaceused.

use sybsystemprocs
go
sp_helptext sp_spaceused
go

But as a start, something like

select object_name(id) as "table name", name as "index name", indid,
reserved_pgs(id,dpgs)
from sysindexes where id > 100


-bret


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.