Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Pierre
Using this technique I have the same Issue. It's now running for severals hours, I'm at a 40% and looking at show full processlist, it's getting slower and slower. It will never finish. I think there is a bug here. Firstly, regardly the memory usage, It doesn't correctly use the buffer I did

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Pierre
Ok I understand, but this doesn't resolve the initialization problem, I'm sure there is a bug, or something which can be improved a lot. I can't use the UNIQUE constraint when I have to much key which doesn't fit in RAM. Because even If have memcache/bloom filter in front, I still need to

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Justin Swanhart
Load the data THEN add the index. This will do the unique check once instead of on every insertion. On bloom filter miss, select from the table and insert if it isn't there. If this is multithreaded use innodb or tokudb and select for update, to prevent race. Sent from my iPhone On

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Justin Swanhart
What data type are the constraints over? A unique index over a raw md5 is much better than one on a varchar(255) or even varchar(32) Sent from my iPhone On Feb 12, 2014, at 12:49 AM, Pierre pi...@hotmail.it wrote: Ok I understand, but this doesn't resolve the initialization problem, I'm

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Pierre
You don't undestand, I already did this. Read the thread since the beginning : https://lists.launchpad.net/maria-discuss/msg01338.html = load data in empty table with index https://lists.launchpad.net/maria-discuss/msg01361.html = Load the data in empty table THEN add the index (what you are

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Reindl Harald
your keys *must* fit in the RAM, period your key-buffers must be large enough Am 12.02.2014 11:10, schrieb Pierre: You don't undestand, I already did this. Read the thread since the beginning : https://lists.launchpad.net/maria-discuss/msg01338.html = load data in empty table with index

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Pierre
Yes, that's what I'm saying, you can't create a UNIQUE index of a table where the keys doesn't fit in RAM/key_buffer. (if it's a basic not unique INDEX it's not a problem and it doesn't apply). If it's not a bug, it's a feature, then it should be documented. Le 12/02/2014 11:15, Reindl Harald

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Sergey Vojtovich
Hi Pierre, there are quite a few MySQL bug reports in MySQL bug database that can affect your use case. Like: http://bugs.mysql.com/bug.php?id=5731 http://bugs.mysql.com/bug.php?id=29446 http://bugs.mysql.com/bug.php?id=59925 http://bugs.mysql.com/bug.php?id=62570

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Pierre
Yep, myisam_sort_buffer_size and key_buffer_size were set both to 6G and show variables confirmed it. Moreover, when I created non-unique index both buffers were used (mysql was using 12G of RAM), however, when I created UNINQUE index only key_buffer was used (mysql was using 6G of RAM).

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Sergei Golubchik
Hi, Pierre! Okay, there were quite a few replies already here. I'll chime in, but only to confirm that there's no easy solution, unfortunately :( On Feb 10, Pierre wrote: Hello, Mariadb is getting slower and slower when I'm inserting a massive amout of data. I'm trying to insert 166 507 066

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Roberto Spadim
hi guys one doubt... using btree have a O(log N), what about using tokudb? 2014-02-12 12:45 GMT-02:00 Sergei Golubchik s...@mariadb.org: Hi, Pierre! Okay, there were quite a few replies already here. I'll chime in, but only to confirm that there's no easy solution, unfortunately :( On

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Pierre
And also it's worth noting that MariaDB-10.0 rebuilds both UNIQUE and non-UNIQUE indexes the fast way when you do ALTER TABLE ... ADD KEY. Well this is a good news ! I'm going to give it a try. Le 12/02/2014 15:45, Sergei Golubchik a écrit : Hi, Pierre! Okay, there were quite a few

Re: [Maria-discuss] Codership's Galera patch part of standard MariaDB

2014-02-12 Thread Sergei Golubchik
Hi, Honza! On Feb 11, Honza Horak wrote: Hi guys, my Google-foo is poor today and I can't find any discussion about inclusion of Codership's Galera patch to standard code-source of MariaDB. I'd like to see that one could just use the wresp plugin and have a working Galera cluster (even

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Sergey Vojtovich
Hi Sergei, Pierre, On Wed, Feb 12, 2014 at 03:45:06PM +0100, Sergei Golubchik wrote: Hi, Pierre! Okay, there were quite a few replies already here. I'll chime in, but only to confirm that there's no easy solution, unfortunately :( On Feb 10, Pierre wrote: Hello, Mariadb is getting

Re: [Maria-discuss] Very slow insert with load data infile

2014-02-12 Thread Sergei Golubchik
Hi, Sergey! On Feb 12, Sergey Vojtovich wrote: This is used when you insert data into the empty table. Or when you add an index to the existing table. Or when you enable indexes. That is: 1. LOAD DATA INFILE 'everything, not in chunks' (a convenient way would be to load from a