Jump to content

Do indexing advantages overcome their advantages ?


angelcool

Recommended Posts

 

Basically what I wanted is the opinion from someone experienced using indexes in big tables (10GB~20~30GB); I am testing MySQL, so far the test table I created reached 1.2 GB, now I can tell/feel how an index(primary key,auto increment) will increase performance for a SELECT query. The table has 10,000,00 rows, a SELECT without index (full scan) takes about 12-18 seconds with an index query the time is less than 1/4 of a second.

 

On the other hand, I have read that the indexes will slow down the speed of writing queries (INSERT, DELETE, UPDATE), since every time a record is changed the indexes must be updated (I understand that a solution for this issue could be setting up replication and redirect all your write queries to the master and read ones to the salves ). So,  Does indexing advantages overcome writing disadvantages ?

 

Also, what if it is a complex query that required a comparison in a non-index column in a 30GB table? You executed and go to lunch ? :shrug:

 

Anyone out there managing a big table/DB?

 

Link to comment
Share on other sites

This forum is pretty large and I'd say the DB is just as large too if not larger... and although I don't manage it, I can guarentee you that it uses indexes.  To not use indexes in a large DB would be insane IMO.  Without indexes, how would you JOIN other tables in your query.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.