Results 1 to 4 of 4

Thread: Anyone Know How to Add Indexes to MySQL Queries?

  1. #1

    Default 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.

  2. #2

    Default 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

  3. #3
    Join Date
    May 2007
    Posts
    394

    Default 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.

  4. #4

    Default 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.

Similar Threads

  1. MySql CPU Overload
    By tugacari in forum Bug Reports
    Replies: 4
    Last Post: 07-31-2008, 06:06 PM
  2. MySQL server has gone away
    By dotcom in forum Installation Support
    Replies: 4
    Last Post: 06-05-2008, 10:40 AM
  3. Question about MySQL query
    By tnuriel in forum General Discussions
    Replies: 1
    Last Post: 04-19-2008, 05:37 AM
  4. MySQL server has gone away
    By vatsan in forum Installation Support
    Replies: 1
    Last Post: 04-17-2008, 05:38 AM
  5. MySQL server has gone away
    By cruise in forum Fixed Bugs
    Replies: 11
    Last Post: 09-27-2007, 08:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •