Home » RDBMS Server » Server Administration » Need Help in creating Index
Need Help in creating Index [message #151755] Mon, 19 December 2005 01:07 Go to next message
chandanbhamra
Messages: 84
Registered: April 2005
Location: India
Member
Hi,

I have to create one index and i want to know certain things.

How much space this index requires while creating it ?

I have got the no. of rows (22318545) & average row length by using this below query and this returns 78.58 and with this i estimated it to be(78.58*22318545) 1.6 GB nearly 2 GB.

Is this the correct way to know this much space will be required to create the index ??

*************Query to get the average row length*************
SELECT AVG(LENGTH(STATUS)+LENGTH(SERVICE_OBJ_ID0)+LENGTH(DESCR)+LENGTH(OBJ_ID0)) FROM Table1
*************************************************************

Other thing is, How can i determine the value of ini_trans, Intial Extent & Next Extent size What factor i have to consider to set these values. My tablespace will be dictonary managaned. This is a existing tablespace.

Please help me in this

Thanks in advance
Chandan Singh


Re: Need Help in creating Index [message #151824 is a reply to message #151755] Mon, 19 December 2005 06:31 Go to previous messageGo to next message
orausern
Messages: 826
Registered: December 2005
Senior Member
Hi,

About initrans, initial extent,next extents, I think you can leave these values to their defaults and it should be ok...in locally managed tablespaces they are automatically managed and do not require to be specified..

about knowing the space for the index, remember that index also has to store the ROWID of the row , in addition to the values of columns of the index.

is the index to be created on the 4 columns that you have mentioned here?
SELECT AVG(LENGTH(STATUS)+LENGTH(SERVICE_OBJ_ID0)+LENGTH(DESCR)+LENGTH(OBJ_ID0)) FROM Table1

For index, you have to consider ONLY the columns which you are indexing , not all columns.

Thanks,
N.
icon2.gif  Re: Need Help in creating Index [message #151843 is a reply to message #151755] Mon, 19 December 2005 07:09 Go to previous messageGo to next message
chandanbhamra
Messages: 84
Registered: April 2005
Location: India
Member
Hi

Thanks for your reply.

I am using dictionary managed tablespaces & yes, i have to create index on 4 columns. So what's the way to calculate the space required ?

Is is correct method that i have used to get the space.

(SELECT AVG(LENGTH(STATUS)+LENGTH(SERVICE_OBJ_ID0)+LENGTH(DESCR)+LENGTH(OBJ_ID0)) FROM Table1)*No. of rows = space required.

Thanks & Regards
Chandan Singh



Re: Need Help in creating Index [message #151846 is a reply to message #151824] Mon, 19 December 2005 07:29 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator

Incase of DMT use
PCTINCREASE=0 and INITIAL=NEXT.
Re: Need Help in creating Index [message #151847 is a reply to message #151843] Mon, 19 December 2005 07:30 Go to previous messageGo to next message
orausern
Messages: 826
Registered: December 2005
Senior Member
HI,

I dont know for sure, but should be more or less true,except that you need to add the space taken to store the rowids also..

thanks
N.
Re: Need Help in creating Index [message #151873 is a reply to message #151755] Mon, 19 December 2005 09:47 Go to previous message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
And any free space percentages need to be added...

And get off dictionary managed if you can.
Previous Topic: Need help on Initialization Parameters
Next Topic: Temporary segment in Permanent tablespace
Goto Forum:
  


Current Time: Fri Sep 20 15:34:37 CDT 2024