Anyone Know How to Add Indexes to MySQL Queries?
Hey,
So I was just notified by my shared hosting company that I am using up too much of the server's resources.
They said that my problem is that my queries are not optimized properly.
Specifically, they said that this message keeps appearing:
# Query_time: 0 Lock_time: 0 Rows_sent: 1 Rows_examined: 77788
In other words, for each query, there are over 70,000 rows being examined, which is taking up far more server resources than is necessary.
They said that I can remedy this situation by indexing my database, as is explained here:
http://www.databasejournal.com/features ... hp/1382791
and that this alone should greatly reduce my server use.
Unfortunately, my programming skills are pretty weak, and my MySQL skills even weaker.
So I'm wondering if there is anyone that might be able to do this for me. If so, PM me and let me know how much you'd charge.
If not, perhaps this is something admin could address for the next release.
Re: Anyone Know How to Add Indexes to MySQL Queries?
it should be...
CREATE INDEX my_index_name ON my_table(my_column)
but have a look here: http://dev.mysql.com/doc/refman/5.0/en/ ... index.html
Re: Anyone Know How to Add Indexes to MySQL Queries?
Do you have PhpMyAdmin? You most likely do - ask your host. You can just back up your current table (download it!) and then create the index point-and-click. Pretty easy.
Re: Anyone Know How to Add Indexes to MySQL Queries?
Would anyone be willing to do this for me (for a fee of course)?
Apparently it's pretty easy, but unfortunately I'm completely MySQL illiterate.
PM me if you're interested, and let me know how much you'd charge.