HyperSQL (HSQLDB): massive insert performance

前端 未结 3 1683
既然无缘
既然无缘 2021-02-11 02:48

I have an application that has to insert about 13 million rows of about 10 average length strings into an embedded HSQLDB. I\'ve been tweaking things (batch size, single threade

3条回答
  •  自闭症患者
    2021-02-11 03:13

    H2Database may give you slightly better performance than HSQLDB (while maintaining syntax compatibility).

    In any case, you might want to try using a higher delay for syncing to disk to reduce random access disk I/O. (ie. SET WRITE_DELAY )

    Hopefully you're doing bulk INSERT statements, rather than a single insert per row. If not, do that if possible.

    Depending on your application requirements, you might be better off with a key-value store than an RDBMS. (Do you regularly need to insert 1.3*10^7 entries?)

    Your main limiting factor is going to be random access operations to disk. I highly doubt that anything you're doing will be CPU-bound. (Take a look at top, then compare it to iotop!)

提交回复
热议问题