I read that in versions of mysql prior to 3.23 (my host has 3.21 I believe), that if you want mysql to use an index you must "use columns of the same type for comparison purposes" otherwise MySql won't use the index.
I'm confused exactly what this means, and how it will affect me.
Say I have a table with many columns among which are the columns category(varchar) and time(time). Ideally, I will be selecting from the various categories based on time. So let's say that I want to select the most 5 entries of category X. I would do a select on category X ordered by time- I assume. Assuming this is the case, my question is about the indexing. Does this statement at the top mean it will just waste space to index? If not, should I index category and time separately. or as one index.
I hope this makes sense. It would be a lot easier I think my host had 3.23.
A completely unrelated question is, do you need to index set or enum column types?
And thanks for the help in advance.
I'm confused exactly what this means, and how it will affect me.
Say I have a table with many columns among which are the columns category(varchar) and time(time). Ideally, I will be selecting from the various categories based on time. So let's say that I want to select the most 5 entries of category X. I would do a select on category X ordered by time- I assume. Assuming this is the case, my question is about the indexing. Does this statement at the top mean it will just waste space to index? If not, should I index category and time separately. or as one index.
I hope this makes sense. It would be a lot easier I think my host had 3.23.
A completely unrelated question is, do you need to index set or enum column types?
And thanks for the help in advance.