Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Duplicate
-
10.11, 11.4
-
None
Description
According to thiru,
https://github.com/MariaDB/server/commit/3cef4f8f0fc88ae5bfae4603d8d600ec84cc70a9
optimization, with "single undo log record TRX_UNDO_EMPTY" does not work
It does not work if I LOCK TABLE WRITE prior to LOAD DATA INFILE, it does not work if I start transaction after LOCK TABLE WRITE, and it does not work, if I also add "set autocommit=0" to the mix.
Loading 1,4G worth of data into empty table, with any of the above tricks, profiler shows 15% of the time spent on row_purge_reset_trx_id()
Can't enable "bulk optimization" because of the bug MDEV-34703 I filed previously,
can't increase innodb sort buffer sizes, because actual requirement for tens of GB worth data
is unknown.
Attachments
Issue Links
- blocks
-
MDEV-33188 Enhance mariadb-dump and mariadb-import capabilities similar to MyDumper
-
- Stalled
-
- is duplicated by
-
MDEV-34703 Innodb bulk load : high IO, crashes on Linux, OOM on Linux, as tested with LOAD DATA INFILE
-
- Closed
-
- relates to
-
MDEV-515 innodb bulk insert
-
- Closed
-
-
MDEV-5171 Add support for --innodb-optimize-keys to mysqldump.
-
- Closed
-
-
MDEV-24621 In bulk insert, pre-sort and build indexes one page at a time
-
- Closed
-
-
MDEV-24813 Locking full table scan fails to use table-level locking
-
- In Review
-
-
MDEV-33625 Add option --dir to mariadb-dump
-
- Closed
-
-
MDEV-34703 Innodb bulk load : high IO, crashes on Linux, OOM on Linux, as tested with LOAD DATA INFILE
-
- Closed
-
I think that similar to what was done already in
MDEV-11415andMDEV-515, it would be best to disable row-level undo logging for LOAD into an empty table.MDEV-515allows to replace the row-level undo logging with table-level logging and locking. We definitely would not want to have an extremely slow row-by-row rollback of the bulk insert in case the server was killed or the operation failed. So, table-level logging seems to be the way to go.As noted in MDEV-24813, the interaction of LOCK TABLE and transactions is rather broken.
If I understood it correctly, for
MDEV-33625we’d want a way to enableMDEV-515but disableMDEV-24621for data loads. If I got it correctly, the current idea would be to create the clustered index row by row, and then create the indexes afterwards (MDEV-5171).