August 27th, 2000, 01:49 PM
I asked a question about indexing with a version of Mysql prior to 3.23, and didn't get a response. My question is going to be repeated at the bottom, but now I realize I could answer it if anyone knew where documentation for MySql for older versions. I've found download sites for older versions but no documentation.
My old question:
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(set) 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. And does it make since to index set fields which my category field will be?
And thanks for the help in advance.