🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.databases.oracle.server
Article #77

Re: Automatic index generation & little tunning

#77
From: Chris Hamilton
Date: Fri, 01 May 1998 00:00
58 lines
3114 bytes
Jordi Bellver <bellver@tau.uab.es> wrote ...
 
> Can someone explain under What circunstances are index automatically
> generated ?
> I know that, when I create a table with PK, automatically is generated
> an index for this table,
> but... has the same result a Fk ? or a NOT NULL constraint ?

Only on a Primary Key constraint and a Unique constraint.

Make sure you either (a) specify the storage parameters for the index via
the "USING INDEX" clause, or (b) set the parameters in the index tablespace
the way you want and make it your DEFAULT tablespace.
 
> And related with index and tunning, I think that default Storage
> parameters and
> increase parameters are in general good, not allways.

Not always!  In fact, you should change them.  My current project consists
of dozens of small servers all over the country, with no local DBA and poor
communications links.  Future data growth is not really known and the
servers are non-dedicated (ie, often acting as NT / NetWare file servers as
well).  So for easiest "hands-off" management of storage, I created
auto-extending data files, and storage parameters like the following:

initial 50 / 100 / 200k, depending on object type / size
next 50 / 100 / 200k, ditto
pctincrease 0, for consistent growth
minextents 1
maxextents unlimited (need 7.3 for this)
pctfree 10
pctused 40

So I'll wind up with potentially lots of small extents for some objects,
but at least they're consistently sized in each tablespace, and they'll
never run out of space (which would require DBA intervention, not easily
available).  And they won't need to add datafiles.  Performance is not the
major issue since the data is not overly large - so far it's been the
developer's SQL that's caused most of the problems.  And the developers (at
yet another remote site) can simply put the objects they create in the
proper tablespace and they'll have reasonable parameters.

>     For a example, if in table A I've lots of inserts and updates, what
> are the best
> parameters ? (PCTFREE, MINEXTENTS, PCTINCREASE...)


>     And if in table B are only 1 insert and lots of selects ? (by a PK
> with its own index)

Use a PCTFREE of 1 or 0 to utilize the maximum amount of space per block.

Chris
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Chris Hamilton -- toneczar@erols.com
City of Washington Pipe Band
http://www.serve.com/cowpb/chamilton.html
Technical Details
Message-ID: <01bd74f1$f1e810e0$73344b9b@chrish.hq.usace.army.mil>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35429D1D.782E39E9@tau.uab.es>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fa4f9,7001ecb7d2eba85f
X-Google-Attributes: gidfa4f9,public
X-Google-Thread: f99a8,7001ecb7d2eba85f
X-Google-Attributes: gidf99a8,public
X-Google-Thread: 103117,7001ecb7d2eba85f
X-Google-Attributes: gid103117,public
From: "Chris Hamilton" <toneczar@erols.com>
Subject: Re: Automatic index generation & little tunning
Date: 1998/05/01
Message-ID: <01bd74f1$f1e810e0$73344b9b@chrish.hq.usace.army.mil>
X-Deja-AN: 349291939
References: <35429D1D.782E39E9@tau.uab.es>
Organization: Corps of Engineers, North Western Division
Newsgroups: comp.databases.oracle.server,comp.databases.oracle.misc,cern.oracle.cde