Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

table partitioning doubt

0 views
Skip to first unread message

zmaker

unread,
May 14, 2008, 4:12:43 AM5/14/08
to
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!!!

Mladen Gogala

unread,
May 14, 2008, 6:54:52 AM5/14/08
to
On May 14, 10:12 am, zmaker <paolo.alive...@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?

Why don't you effing try it?

tamk...@gmail.com

unread,
May 14, 2008, 7:01:43 AM5/14/08
to

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

Mladen Gogala

unread,
May 14, 2008, 7:37:04 AM5/14/08
to
On Wed, 14 May 2008 04:01:43 -0700, tamk...@gmail.com wrote:

> You can easily check which rows

That's almost the same as what I was telling him.

--
Mladen Gogala
http://mgogala.freehostia.com

joel garry

unread,
May 14, 2008, 12:19:23 PM5/14/08
to
On May 14, 4:37 am, Mladen Gogala <mgog...@yahoo.com> wrote:

> On Wed, 14 May 2008 04:01:43 -0700, tamkat...@gmail.com wrote:
> > You can easily check which rows
>
> That's almost the same as what I was telling him.
>

And yet, if Kenneth had done it the way the OP specifically asked
about, wouldn't he have gotten ORA-14037?

jg
--
@home.com is bogus.
"I believe I can fly." - my way too cute kid singing.
http://www.signonsandiego.com/news/business/20080514-9999-1b14silver.html

0 new messages