Hi everyone
I have a query on 4 tables (via various joins).
MYSQL automatically uses uses primary keys for the joins, so that part is superb.
So for example, TABLE A uses A.id primary key as index for the join.
However, because of this,
if I do an ORDER BY DATE on table A, MYSQL resorts to using filesort. (EXTREMELY SLOW!!!), because (if im not wrong?) u can't use more than 1 index per table.
THis happens even though the DATE column is indexed.
Is there any workaround for this via unions or subselects or something?
Appreciate any advice on which direction i should head.
Many thanks!
I have a query on 4 tables (via various joins).
MYSQL automatically uses uses primary keys for the joins, so that part is superb.
So for example, TABLE A uses A.id primary key as index for the join.
However, because of this,
if I do an ORDER BY DATE on table A, MYSQL resorts to using filesort. (EXTREMELY SLOW!!!), because (if im not wrong?) u can't use more than 1 index per table.
THis happens even though the DATE column is indexed.
Is there any workaround for this via unions or subselects or something?
Appreciate any advice on which direction i should head.
Many thanks!