Subject Re: commit after insert is very slow
Author svanderclock
thanks ivan,

yes i just try with force write off, and yes now i have

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: 0

the commit is now very fast (in apparence) but in fact it's not really help because if i execute five time the query, on the fifth (exactly on every fifth execute) i have

Time to execute the sql: 0 ms
Indexed Read: 117
Non Indexed Read: 0
Inserts: 30
Updates: 0
Deletes: 30
Time to commit the data: 3202

:( it's mean if i m unlucky when i execute the query that it is the flush time i loose :( i was thinking that the flush was done by a separate thread and not by a "commit" thread

do you have any other idea how to speed up the commit ? the index is multi column (6 at max) ... do you thing reduce the number of column can help ?

thanks you by advance


--- In firebird-support@yahoogroups.com, "Ivan Prenosil" <Ivan.Prenosil@...> wrote:
>
> > 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/
>