List:General Discussion« Previous MessageNext Message »
From:Heikki Tuuri Date:October 12 2005 5:14pm
Subject:Re: Non-linear degradation in bulk loads?
View as plain text  
Jon,

hmm... maybe one of the indexes inevitably is in a random order.

Please post a typical

SHOW INNODB STATUS\G

when the inserts happen slowly.

What is your my.cnf like?

Regards,

Heikki
Innobase/Oracle

----- Alkuperäinen viesti ----- 
Lähettäjä: "Jon Frisby" <jfrisby@stripped>
Vastaanottaja: "Heikki Tuuri" <heikki.tuuri@stripped>; 
<mysql@stripped>
Lähetetty: Wednesday, October 12, 2005 3:08 AM
Aihe: RE: Non-linear degradation in bulk loads?


> Two solutions: 1) sort the rows to be inserted on the key
> 'email' before inserting.
>
> 2) Or:
>
> http://dev.mysql.com/doc/mysql/en/innodb-tuning.html
> "
> If you have UNIQUE constraints on secondary keys, starting from MySQL
> 3.23.52 and 4.0.3, you can speed up table imports by
> temporarily turning off the uniqueness checks during the
> import session:
> SET UNIQUE_CHECKS=0;
>
> For big tables, this saves a lot of disk I/O because InnoDB
> can use its insert buffer to write secondary index records in a batch.
> "
>
> But make sure you do not have any duplicates in the rows!

After sending my mail, I discovered SET UNIQUE_CHECKS=0, and subsequent
to that it also occurred to me to try putting the data in in sorted
order.  Unfortunately, doing UNIQUE_CHECKS=0 did not work, and even the
combination of both did not work.  First chunk (3.4m rows) was ~1.5
minutes, second was ~5 minutes...

At this point I'm inclined to believe that there is something very wrong
with the disk subsystem because of this and other problems (doing a
large cp from the datapool filesystem to another filesystem brought the
database to a near-halt, among other things).

As a stop-gap solution, I created the table with no indexes, and loaded
all the data (loaded in linear time), and plan on doing a CREATE UNIQUE
INDEX on the table.  Will this happen in linear time, or near-linear
time?

*sigh*

-JF 

Thread
Non-linear degradation in bulk loads?Jon Frisby11 Oct
  • Re: Non-linear degradation in bulk loads?Manoj11 Oct
  • Re: Non-linear degradation in bulk loads?C.R. Vegelin11 Oct
    • Re: Non-linear degradation in bulk loads?mos11 Oct
  • Re: Non-linear degradation in bulk loads?Devananda11 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby11 Oct
Re: Non-linear degradation in bulk loads?Heikki Tuuri11 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby12 Oct
  • Re: Non-linear degradation in bulk loads?Heikki Tuuri12 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby14 Oct
Re: Non-linear degradation in bulk loads?Heikki Tuuri16 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby17 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby17 Oct
  • Re: Non-linear degradation in bulk loads?Heikki Tuuri17 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby17 Oct
  • Re: Non-linear degradation in bulk loads?Heikki Tuuri17 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby17 Oct
RE: Non-linear degradation in bulk loads?Jon Frisby18 Oct
Re: Non-linear degradation in bulk loads?Heikki Tuuri18 Oct