Hello people,
I am doing a simple select * using a where clause that referes to a indexed filed. I would expect MySQL executing the query and takind advantage of the indexed field. MySQL instead seams not to agree with me.
[system is a MySQL 4.01 for Windows/Table is MyISAM]
This is what happen:
- select * from this_MyISAM_table where indexedfield = 'thevalue'
Explain return that index is not used.
instead:
- select indexedfiled from this_MyISAM_table where indexedfield = 'thevalue'
Explain return that index is used.
and obviously:
- select indexedfiled,NOT-indexedfiled from this_MyISAM_table where indexedfield = 'thevalue'
Explain return that index is not used.
Is all this logical to you? Do I really have to think that Micosoft SQL handles indexes better than MySQL.
Cheers and thanks for your kind suggetions.