I was working on Joining three table which took 3min 4 sec to execute. Unacceptably slow. There was no way I could make it faster because the logic was straight forward.
Then I though one of the column that I was using in JOIN (even though it was number) did not have index on it. So I put index on it using
create index index_mylastcolumn on mytable(fieldname)
And then ran my query. It gave result in less than a second.
The result always JOIN on Index column esp if the tables are large!