Subject Re: [firebird-support] commit after insert is very slow
Author Ivan Prenosil
> when i execute some SQL, the time to execute the sql is very fast (16ms) but the time to commit the data is very very slow (2293
> ms, even some time more than 10 secondes !)
>
> Time to execute the sql: 16 ms
> Indexed Read: 117
> Non Indexed Read: 0
> Inserts: 30
> Updates: 0
> Deletes: 30
> Time to commit the data: 2293
>
> the tables where the record was inserted/deleted have lot of indexes (around 30 index by table, and around 10 columns by table)

On commit, every page in FB cache changed by your transaction
(and depending) must be written to disk.
FB keeps database in consistent state by writing pages in specific order,
and setting Forced Writes On prevents OS from optimizing those writes.
So, modifying tables with lots of indexes like yours causes
heavy disk trashing and so is slow.
You should reduce number of indexes,
or (if you can take that risk) turn Forced Writes Off.

Ivan
http://www.volny.cz/iprenosil/interbase/