Do you have a table structure - preferably SQL?
Also you say 'selected index as the index' which I'm not sure what you mean by this? Are you using phpmyadmin or some other database tool?
What fields do you need to be indexed?
help with indexing
Moderators: egami, macek, gesf
the primary key value for your table is a value that's used to identify the row. That one should have the primary index, and only one of those is allowed per table.
If you have some other data in your table that's unique (for example a character name or in-game id number) you can also use a unique index for that. A unique index will give an error if you try to insert a duplicate value.
For all other information, you can use a regular index. It's generally only worth indexing columns that you will be using a lot, so if you're looking up things by a number such as health, index that.
In general though, with a mysql database the performance improvement you'll see with indexing will be very small until the database tables get quite large (e.g. around 1 million rows).
If you have some other data in your table that's unique (for example a character name or in-game id number) you can also use a unique index for that. A unique index will give an error if you try to insert a duplicate value.
For all other information, you can use a regular index. It's generally only worth indexing columns that you will be using a lot, so if you're looking up things by a number such as health, index that.
In general though, with a mysql database the performance improvement you'll see with indexing will be very small until the database tables get quite large (e.g. around 1 million rows).
For your needs I don't see why you'd need a multi-part index. Since these are all separate statistics, I'm guessing you'd be querying many of them separately. If not, just index the few most commonly queried columns together. A multi-column index is slightly faster than a single column, but again unless your tables are into the millions of rows, you probably won't see any difference.