[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MySQL indexes

Posted on 2007-07-25
2
Medium Priority
?
215 Views
Last Modified: 2013-11-26
Hi!

I have a question regaring indexes in MySQL.

When I insert data I have read that is good to turn them off

But is that still ok if I have records that already exists in the database that i'm going to insert agan.

I use the On Duplicate Insert so is it still ok then even if I turn the indexes off?

And how do I turn it off? do I need to do something more then turn it off and then on again. do I need to do any optimize,flush etc?
0
Comment
Question by:AWestEng
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 19569304
>When I insert data I have read that is good to turn them off
if you "BULK" insert alot of rows, yes. not when you insert few/single rows.


>I use the On Duplicate Insert so is it still ok then even if I turn the indexes off?
as this is mostly used when doing single inserts, you really should keep the indexes in place.

you cannot "turn" an index of in MySQL, you have to drop the index.
0
 
LVL 1

Author Comment

by:AWestEng
ID: 19570128
oki.  I insert about 8000 rows.. but I still should keep it on then?
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question