Question: I want to remove an index in a table whose access in php never uses the indexed column. Index takes up extra space and I am trying to trim it. It's a table of phone numbers. A phone number is linked to a user profile's id. So it has 3 columns. `id` (index), `number` and `person`. I was wondering if removing the index will affect the queries that use `number` or `person` in the where clause. My gut feeling is that it shouldn't but I am afraid computer science doesn't work on gut feelings. The data is accessed via `join`s. For example...

```
SELECT *
FROM people ... LEFT JOIN
     phoneNumbers
     ON people.id = phoneNumbers.person

```

Edit: Apparently no one seems to be able to answer the question in the title.

Answer: 
In the case you show, only the `person` column would benefit from an index.

Indexes help in basically four cases:

* **Row restriction**, that is finding the rows by value instead of examining every row in the table.

	+ **Joining** is a subset of row restriction, i.e. each distinct value in the first table looks up matching rows in the second table. Indexing a column that is referenced in the `ON` clause is done in the same way you would index a column referenced in the `WHERE` clause.
* **Sorting**, to retrieve rows in index order instead of having to sort the result set as an additional step.
* **Distinct and Group By**, to scan each distinct value in an index.
* **Covering index**, that is when the query needs only the columns that are found in the index.

In the case of InnoDB, every table is treated as an *index-organized table* based on its primary key, and we should take advantage of this because primary key lookups are very efficient. So if you can redefine a primary key on your `phoneNumbers.person` column (in part), that would be best.
If the `id` column is an auto-incrementing integer, you have already indexed the table in the most efficient way possible. Removing it will make MySQL treat (`number`, `person`) as the table's primary key, which will cause less efficient look-ups. 

Additionally, any index you create in the future will contain two columns, the first being the indexed field in the desired order, the second being the table's primary key. If you remove the `id` column and later decide to index the table on `person`, then your index will be larger than the table itself: each row would be: `| person | (number, person) |`.

Given that you're querying on this relationship, the `person` column **should** be indexed, and leaving the `id` column in place will ensure that the `person` index is as small and as quick as possible.