Hi,
i am facing performance issue while i am running the below query in environment as MySQL 5.7.11 InnoDb DB. I am having indexes on joined and groouped columns
columns (i.e. id and date).
is performance issue causes when i apply group up even though i have index in that ?, could you please help on this
SELECT
z.id
, type
, code
FROM temp pd
join (select p.id, max(p.date) as lastdate FROM temp p group by p.id) z
on z.id = pd.id and pd.date < z.lastdate
Thanks,
Ranala
i am facing performance issue while i am running the below query in environment as MySQL 5.7.11 InnoDb DB. I am having indexes on joined and groouped columns
columns (i.e. id and date).
is performance issue causes when i apply group up even though i have index in that ?, could you please help on this
SELECT
z.id
, type
, code
FROM temp pd
join (select p.id, max(p.date) as lastdate FROM temp p group by p.id) z
on z.id = pd.id and pd.date < z.lastdate
Thanks,
Ranala