Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Partition Name in Select and Group-By

511898Mar 29 2007 — edited Mar 29 2007

Is there a function that returns the partition name a row is stored in? I'd like to use it in a SELECT statement, if it exists.

The goal is to get row counts per partition to determine skew on a hash-based partition (otherwise, I'd just select and group-by the partition key). I want to do something like this:

SELECT PARTITION_NAME, COUNT(*) as PER_PART_COUNT
  FROM SOMETABLE
 GROUP BY PARTITION_NAME;

Obviously, I would replace the string "*PARTITION_NAME*" with whatever function returns that value.

NOTE: Before the forum sharks jump all over me, I did search the documentation and forums, but I came up empty handed.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2007
Added on Mar 29 2007
3 comments
1,401 views