Skip to Main Content

Oracle Database Discussions

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

select performance from all_tables vs user_tables (same for columns)

884570Aug 25 2011 — edited Aug 25 2011
Hi, I need to run two queries, one is to select either all tables of a specific owner, the other query is to select all columns of that owner.

Sometimes the owner is the user I connected as, and sometimes its different.

I was wondering what the performance implication is of running:

select ... from all_tables where owner = 'my owner';
vs
select ... from user_tables;

I realize I can only do this if 'my owner' is the connected user, but if there is a performance difference, I'd rather put the 'if/else' code in there to get faster results.
Same question for all_tab_columns vs. user_tab_columns.

I ran a test locally here (development shop), and don't see performance difference, but I am not sure how it would work out in production database.

If version of Oracle matters, I'm interested in Oracle 10g and above. (nothing below 10g)

Edited by: user5947840 on Aug 25, 2011 6:30 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2011
Added on Aug 25 2011
1 comment
325 views