Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Query tuning with tablename alias
Wendy - I think the difference between using an alias or not is negligible.
My reasoning is that this would be easy to test (good idea if you have a
moment) and there are enough picky Oracle developers that if this was not
negligible, people would have been bragging about this as their secret
method to make their application faster, and some vendors would be selling
SQL pre-processors that would allow you to "use aliases without penalty". So
I wouldn't worry about it, but you are welcome to test this and if you can
find a difference, we would all be glad to hear about it. It has happened
before, where everyone has assumed they knew the answer and later it turned
out that something simple was a bad assumption.
Dennis Williams
DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com <mailto:dwilliams_at_lifetouch.com>
-----Original Message-----
Sent: Wednesday, November 20, 2002 12:13 PM
To: Multiple recipients of list ORACLE-L
Hello list.
I have recently been tasked with trying to optimize some slow performing queries (Oracle 8.1.7) for an application that generates reports in a data warehouse type environment. I have noticed in most of the queries that the table names have been aliased, but not used elsewhere in the query.
IE. SELECT table1.column1,
table1.column2, table2.column1 FROM table1 A, table2 B WHERE table1.key = table2.key;
Are there any advantage/disadvantages to giving these tables aliases and not using them anywhere else? I am thinking that if the tables have been assigned alias names, they should be referred to by alias names, but I guess I have not seen anything documented on this officially. These queries join tables against remote tables in a different instance, if that makes a difference. Any insight on this would be great.
Thanks.
Wendy Hopper
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: DENNIS WILLIAMS
INET: DWILLIAMS_at_LIFETOUCH.COM
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Nov 20 2002 - 13:58:51 CST
![]() |
![]() |