Re: table partitioning doubt

From: <tamkatten_at_gmail.com>
Date: Wed, 14 May 2008 04:01:43 -0700 (PDT)
Message-ID: <f1de8320-abfc-41c9-8e4c-2c57359ea827@z72g2000hsb.googlegroups.com>


On 14 Maj, 10:12, zmaker <paolo.alive..._at_gmail.com> wrote:
> Hi!
> I have a simple/stupid question about partitioning.
>
> I have created an empty partitioned (by range) table.
>
> Table A partitioned on field 'CID'.
> First partition with CID <= MAXVALUE,
> second partition with CID <= 10000.
>
> When i will load data in this table, the data will be placed in their
> right partition...
>
> So... a record with CID=500 will be saved in the second partition, and
> a record with CID=99999 will be placed in the first partition.
>
> It's right?
>
> Thank you very much for any response!
> Ciao!
>
> PS: sorry 4 my beta-version-english!!!

Hi,

You can easily check which rows go to which partitions with the select ... from Table Partition (<partition_name>)" option, e.g.:

SQL> CREATE TABLE foo
  2 (
  3 c1 NUMBER
  4 )
  5 PARTITION BY range (c1)
  6 (
  7 PARTITION P0 VALUES less than (10),   8 partition prest values less than (maxvalue)   9 ) ;

Tabel er oprettet.

SQL>
SQL> insert into foo values (9);

1 rµkke er oprettet.

SQL>
SQL> insert into foo values (10);

1 rµkke er oprettet.

SQL>
SQL> select * from foo partition (p0);

        C1


         9

SQL> select * from foo partition (prest);

        C1


        10

  • Kenneth Koenraadt
Received on Wed May 14 2008 - 06:01:43 CDT

Original text of this message