MySQL Forums
Forum List  »  Maria

Re: LOAD DATA INFILE
Posted by: Michael Widenius
Date: April 28, 2008 05:28AM

For the moment Maria executes LOAD DATA INFILE the following way:

- Start a transaction
- If file is of zero length, disable all not unique indexes
- Load data. If the page cache overflows, the log is synced up at least
up to the LSN of the overflowed page.
- If indexes where disabled, enable the disabled indexes by doing a
repair-by-sort per index

If you are loading a lot of rows, Maria will create temporary log
files on demand to hold the commit/undo information. When the LOAD
DATA ends, any log files which are not needed anymore will be deleted.

The cost of doing a big load should be in the range of one extra log sync
for every 'page_buffer_size' index+page data that is loaded.

In Maria 1.5 all rows will be inserted with a row id (to support versioning).

The background checkpoint will run at the usual interval and flush the
page buffer in a more or less continuous page order. One may get a
higher load rate by temporarily setting the checkpoint time to a high
value during the load. This is something we plan to benchmark in the
future.

As an optimization, we plan to add an option that you can load an
empty table without versioning information; This will make the table
load faster and make the file smaller at the cost of that transactions
started before the load will see the table suddenly materialized with
all loaded rows in the middle of a the transaction. (Ie, you would
sacrifice repeatable read in this case).

Options: ReplyQuote


Subject
Written By
Posted
April 19, 2008 05:08PM
Re: LOAD DATA INFILE
April 28, 2008 05:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.