John Mancuso wrote:
If I have 2 large tables A and B and I need to join them:
select * from A,B where A.col1=B.col1 If A.col1 is an index and B.col1 is not, if I create an index on B.col1
will this index be used? In other words how are indexes used on table
joins?
Thanks John Mancuso
Linux Administrator/MySQL DBA
IT Infrastructure
American Home Mortgage
w: 631-622-6382
c: 516-652-2475
Use explain, and find out.
MySQL may reverse the two and join A to B inorder to use A's index.
Since there is no WHERE clause, only one of the tables needs an index.

--
Gerald L. Clark
Supplier Systems Corporation

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to