Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Mapping the get_hashed_value to the actual partition

Re: Mapping the get_hashed_value to the actual partition

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 11 Oct 2002 08:18:58 +0100
Message-ID: <ao5vl5$f38$1$830fa79d@news.demon.co.uk>

A quote from one of the best Oracle books on the market:

    Unfortunately, as with range partitioning,     the 'internal' partition number starts counting     from zero whilst the 'external' partition number     visible as the PARTITION_POSITION in the     view family xxx_TAB_PARTITIONS starts     counting from one.

It looks like you need to check partition_position in user_tab_partitions.

The 'randomness' of partition numbers perhaps applies to the SYS_Pnnn names you get, which are generated from a sequence.

--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar dates:
(see http://www.jlcomp.demon.co.uk/seminar.html )

____USA__________November 7/9   (Detroit)
____USA__________November 19/21 (Dallas)
____England______November 12/14

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html





NetComrade wrote in message ...

>I have a table with hashed partitions, and was trying to figure out
>how to figure out where my data is (for restoration from an exp).
>
>If I do something like
>select dbms_utility.get_hash_value(:my_value,0,:num_partitions) from
>dual;
>I get a number in return, however there is no such thing as
>'partition_id', or I couldn't find it. Oracle assigns fairly random
>#'s to partitions (although consecutive), but I recall renaming them.
>The only way I can see this work is thru trial and error. (e.g.
>restore partition one by one and see what they have in them, and see
>what get_hash_value returns).
>
>Does anybody have a better method?
>
>Thanx.
>
>
>---
>oracle 8.1.7, solaris 7
Received on Fri Oct 11 2002 - 02:18:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US