select performance from all_tables vs user_tables (same for columns)
884570Aug 25 2011 — edited Aug 25 2011Hi, 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