gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-developers] Faster (sequential ) inserting of records in MySQL.


From: Jan Marco Alkema
Subject: [GNUnet-developers] Faster (sequential ) inserting of records in MySQL.
Date: Sat, 5 Apr 2003 11:57:10 -0800

Hi All,

Iceman told me:
/* It turns out that for bulk inserts, for MySQL the "LOAD DATA" statement
is by far the fastest method. In tests, it was about 5 times faster than
INSERTs with multiple VALUE lists. Problem with the "LOAD DATA" method is
that data needs to come from a file. This is solved by creating a temporary
file, writing formatted data to that file and then loading the file using a
LOAD DATA. In order to avoid taking up too much disk space, the LOAD DATA is
done when the file reaches a given size. After it has been loaded, the file
is truncated and filled again. */

The code included works on the Linux and Windows platform. It was used for
inserting 6.000.000 telephone records (from CD) in a MySQL database. If you
have to insert a large number of sequential records in a database speed is
very important.

Maybe the use of the "LOAD DATA" command (+ Unixsocket) can speed up gnunet?

Greeting Jan Marco

Attachment: dbmysql.cpp
Description: Text document

Attachment: dbmysql.h
Description: Text document

Attachment: iso.h
Description: Text document

Attachment: ripdb.h
Description: Text document

Attachment: util.h
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]