1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
SQL> select
count(distinct object_id),
count(distinct object_name),
count(*)
from all_objects
COUNT(DISTINCTOBJECT_ID) COUNT(DISTINCTOBJECT_NAME) COUNT(*)
------------------------ -------------------------- ----------
5855 4483 5855
1 row selected.
SQL> create table t1(id, name)
partition by hash(id)
(partition p1,partition p2)
as select object_id,object_name from all_objects
Table created.
SQL> create table t2(id, name)
partition by hash(name)
(partition p1,partition p2)
as select object_id,object_name from all_objects
Table created.
SQL> select count(*) from t1 partition (p1)
COUNT(*)
----------
2931
1 row selected.
SQL> select count(*) from t1 partition (p2)
COUNT(*)
----------
2927
1 row selected.
SQL> select count(*) from t2 partition (p1)
COUNT(*)
----------
2835
1 row selected.
SQL> select count(*) from t2 partition (p2)
COUNT(*)
----------
3026
1 row selected. |