This is an old version of this answer!
Return to the current answerHi Lawrence,
EXPLAIN only works with SELECT statements. Not INSERT statements.
Take the insert wrapper off and explain your select and it will work.
explain select * from batterylog
where id in (
select A.id from batterylog A
where A.testing_date = (
select max(B.testing_date) from batterylog B
where A.brand_battery_country = B.brand_battery_country));
Best regards,
Bill
EXPLAIN only works with SELECT statements. Not INSERT statements.
Take the insert wrapper off and explain your select and it will work.
explain select * from batterylog
where id in (
select A.id from batterylog A
where A.testing_date = (
select max(B.testing_date) from batterylog B
where A.brand_battery_country = B.brand_battery_country));
Best regards,
Bill
William Clark | 08/01/10 at 1:54pm

