Hi,
I couldn't see an answer in 10.4 in the manual or in the mailing list,
but I know this has been discussed before.
If I have two tables:
Table A Table B
ID AID
CID CID
and want to pull all records like so:
SELECT A.*
>FROM A LEFT JOIN ON A.ID = B.AID
WHERE (A.CID = something) OR (B.CID = something)
Can this be done so that it uses indexes? I can't seem to figure out how
to pull this information from the database in one query (as I want to
apply ordering to this) and be optimized.
I remember Monty saying that Mysql used indexes in OR clauses only under
certain conditions, just don't remember what those are. =)
Cheers,
Alex
-------------------- Gossamer Threads Inc. ----------------------
Alex Krohn Email: alex@stripped
Internet Consultant Phone: (604) 687-5804
http://www.gossamer-threads.com Fax : (604) 926-9320