drop table t purge
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
create table T
( x number(10) )
partition by hash ( x )
partitions 8
Table created.
select partition_name
from user_tab_partitions
where table_name = 'T'
PARTITION_NAME | SYS_P17033 | SYS_P17034 | SYS_P17035 | SYS_P17036 | SYS_P17037 | SYS_P17038 | SYS_P17039 | SYS_P17040 |
---|
insert into T
select level
from dual connect by level <= 100000
100000 row(s) inserted.
commit
Statement processed.
select rowid
from T
where rownum = 1
ROWID | AAKAF0AAXAAAAHDAAA |
---|
select substr(rowid,5,2), count(*)
from t
group by substr(rowid,5,2)
SUBSTR(ROWID,5,2) | COUNT(*) | F1 | 12575 | GX | 12381 | GZ | 12382 | GU | 12581 | GY | 12628 | F0 | 12603 | GV | 12508 | GW | 12342 |
---|
select ora_hash(x,7), count(*)
from t
group by ora_hash(x,7)
order by 2
ORA_HASH(X,7) | COUNT(*) | 4 | 12342 | 5 | 12381 | 7 | 12382 | 3 | 12508 | 1 | 12575 | 2 | 12581 | 0 | 12603 | 6 | 12628 |
---|
drop table t purge
Table dropped.
create table T
( x number(10) )
partition by hash ( x )
partitions 5
Table created.
insert into T
select level
from dual connect by level <= 100000
--select DBMS_ROWID.ROWID_OBJECT(rowid) ptn,
-- count(*)
-- from T
-- group by DBMS_ROWID.ROWID_OBJECT(rowid)
100000 row(s) inserted.
select substr(rowid,5,2), count(*)
from t
group by substr(rowid,5,2)
SUBSTR(ROWID,5,2) | COUNT(*) | Gf | 12603 | Gh | 25209 | Gg | 24956 | Gi | 24890 | Gj | 12342 |
---|
alter table T add partition
Table altered.
select substr(rowid,5,2), count(*)
from t
group by substr(rowid,5,2)
SUBSTR(ROWID,5,2) | COUNT(*) | Gf | 12603 | Gk | 12575 | Gh | 25209 | Gl | 12381 | Gi | 24890 | Gj | 12342 |
---|
alter table T add partition
Table altered.
select substr(rowid,5,2), count(*)
from t
group by substr(rowid,5,2)
SUBSTR(ROWID,5,2) | COUNT(*) | Gf | 12603 | Gk | 12575 | Gl | 12381 | Gm | 12581 | Gn | 12628 | Gi | 24890 | Gj | 12342 |
---|
alter table T add partition
Table altered.
select substr(rowid,5,2), count(*)
from t
group by substr(rowid,5,2)
SUBSTR(ROWID,5,2) | COUNT(*) | Gf | 12603 | Gk | 12575 | Go | 12508 | Gl | 12381 | Gm | 12581 | Gn | 12628 | Gp | 12382 | Gj | 12342 |
---|