Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie questions
In article <3909A917.78B51021_at_wineandNOSPAMco.com>,
sferrandez_at_wineandco.com wrote:
> What is an ORACLE CLUSTER ? To what extent is that useful ?
>
An Oracle cluster is a performance tool for tables that have certain
characteristics. There are two types of clusters, index and hash.
Most of the time when someone talks about an Oracle cluser they are
referring to an index cluster.
In an index cluster two or more tables with a common column, cluster key, that are usually selected in a join are physically stored together such that the rows from table A and rows from table B are both stored into the same block. There is no reason for building an index cluster with only one member table. To use Oracle's standard training tables, employees EMP and department DEPT. If most every select access to these tables involves a join of these two tables then it make sense to cluster them together on the dept_no so that Oracle will attempt to store all the emp rows for a depr_no in the same block as the dept row for that dept_no. That way when Oracle retrieves a row for a specific dept_no it has all of them. The cluster index must exist before you can insert or retrieve data from the cluster. There are a couple of special parameters related to clustering that I am not going to talk about as that is beyond a basic explanation but you can find them in the SQL manual under create cluster.
The hash cluster is similiar to the index cluster on how the table rows are stored but instead of using an index to locate the rows Oracle takes the key column(s) and uses hash logic to determine the block to store the row into. Since no index need exist a hash cluster can provide very fast lookup ability on an equality, key = value, condition for a table that is almost always accessed by its primary key and is static in size. Hash clusters support inserts, updates, and deletes but the total number of rows should always be plus or minus a small percentage of some constant. For a non-equality search condition a full table scan is going to result.
I hope this helps.
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri Apr 28 2000 - 00:00:00 CDT