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!

Find tablespace with most indexes

user13117585Mar 19 2011 — edited Mar 19 2011
Hi everyone,

I was wondering if any of you know a better way than mine to find the tablespace with the most indexes?

I made this query but maybe it can be done in another way?
SELECT DISTINCT tablespace_name
  FROM user_indexes
 WHERE tablespace_name IS NOT NULL
   AND index_type != 'DOMAIN'
 GROUP BY tablespace_name 
HAVING COUNT(*) >= (SELECT COUNT(*) 
                      FROM user_indexes
                     WHERE tablespace_name IS NOT NULL
                       AND index_type != 'DOMAIN'
                     GROUP BY tablespace_name 
                    );
Thanks
This post has been answered by Peter Gjelstrup on Mar 19 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2011
Added on Mar 19 2011
13 comments
316 views