Performance issues always have to be measured. There might be several specific reasons for that. I'd appreciate if you could send me a minimal sample project reproducing the problem. Then we will profile and let you know the specific reasons for that.
Thank you. You are using ZeosLib. According to the documentation, Aurelius uses real batch update only with direct driver, FireDAC and UniDAC. When using ZeosLib, it simply simulates the batch statement but inserts each record individually.
When using FireDAC, for example, the time for inserting less than half the time when using ZeosLib. Note that we are right now heavily refactoring and optimizing it. TMS Aurelius 5 will come with great performance improvement and lots of new features thanks to that.
I choose ZeosLib, mainly due to my benchmarking results (using mORMot) : ZeosLib > FireDAC > UniDAC. ZeosLib has amazing performance indeed (see below)
I don't expect Aurelius to have the same performance as mORMot. Aurelius ORM design better suits my needs than mORMot, with its ease of use and learn. I do expect Aurelius to have a balanced performance versus ORM ease of use.
That being said, it would be great if Aurelius can give some priority to ZeosLib, and optimize its ZeosLib-based batch insert. ZeosLib has better performance than FireDAC, overall.
Would you consider improving the Aurelius/ZeosLib batch performance in Aurelius 5?
P.S. What is the expected/estimated release date for Aurelius 5?
AFAIK these benchmarks for ZEOS are using Zeos DBC 'drivers' so they do not deal with TDataSet stuff, while ZeosLib driver for Aurelius do use de TDataSet descendants.
I've created a simple Aurelius driver using ZDBC (based on TMS Aurelius ZeosLib driver) that I have tested only with Firebird (but never did a benchmark of it). It may need some twiks since I do not fully understand Zeos transaction handling (witch I find very confusing). But it mostly works fine for me.
It does not do any batch optimization since Firebird (until v.3) do not support batch inserts (and I use Firebird only), so it will execute one insert at a time, but on a prepared statement.
It's our intention to always improve Aurelius, of course. Support for ZDBC is something that worth investigating, for sure.
Note that we also have the intention to provide our own drivers, which will have, theoretically, even better performance, since we can tailor them specifically for Aurelius needs. SQLite and SQL Server drivers are already available, and Postgres will be the next, even though we are moving forward slower than we would like (mainly because we are also focusing on other features and improvements).
Will native postgres driver be included in Aurelius 5? Or any estimated release time?
(BULK INSERT) Performance with Aurelius seems a problem. For example it takes 5~6 seconds to insert 10000 records (with Cache Update On). It is shocking to find out that for the same amount of records, mORMot takes less than 0.05 second.
Inserting 10000 records is not that a common task with an ORM. mORMot is widely known to be focused on performance. That's not much shocking. In any case, we are constantly improving Aurelius performance, Postgres driver will come, but mainly performance improvements will come very soon. Actually the very next version to be released very soon is already almost twice faster than the current one when it comes recording inserting and updating.