misterx
08-12-2004, 08:10 PM
I want to use indexes for a table I need to search but I'm getting really confused as to how to do it. :confused:
The table is like so:
+-----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | | PRI | NULL | auto_increment |
| title | tinytext | | MUL | | |
| star | text | | | | |
| synopsis | text | | | | |
| label | tinytext | | | | |
| format | tinytext | | | | |
| price | float unsigned | | | 0 | |
| thumbnail | varchar(34) | | | | |
| fullSize | varchar(34) | | | | |
| genre | varchar(20) | | | | |
| subGenre | varchar(20) | | | | |
+-----------+------------------+------+-----+---------+----------------+
I only need to search title, label, star, genre, and subGenre. Should I be making one index for each of those columns?
Also, I've been told that MySQL can somehow rate the search results by how closely they match the search query. Does that involve indexes?
Thanks.
The table is like so:
+-----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | | PRI | NULL | auto_increment |
| title | tinytext | | MUL | | |
| star | text | | | | |
| synopsis | text | | | | |
| label | tinytext | | | | |
| format | tinytext | | | | |
| price | float unsigned | | | 0 | |
| thumbnail | varchar(34) | | | | |
| fullSize | varchar(34) | | | | |
| genre | varchar(20) | | | | |
| subGenre | varchar(20) | | | | |
+-----------+------------------+------+-----+---------+----------------+
I only need to search title, label, star, genre, and subGenre. Should I be making one index for each of those columns?
Also, I've been told that MySQL can somehow rate the search results by how closely they match the search query. Does that involve indexes?
Thanks.