I am reading the table from mysql (using python) with select query like below:
select * from tablename1 where date1= curdate();
I have 798 rows in tablename1 but it is examining more rows than existed. why?
explain select * from tablename1 where date1= curdate();
output:
id select_type table type possible_keys key key_len ref rows Extra
0 1 SIMPLE tablename1 ALL None None None None 1039 Using where
I searched about it but I couldn't get clarity on this. how to optimize my query?
I have tried by keeping primary key but it didn't work.