AW: Journaling

Fabian Kneubuehl support at ysd.ch
Fri Apr 20 06:55:55 CDT 2012


Ivan,

Me again. If I use transaction control I use it specifically, as in the
example mentioned in this mail. But in another simple example I wouldn't:

The user has to enter 1000 patient addresses. She/he will work the whole day
entering these addresses. If I never call DB-Flush she/he loses all entries.
Now I flush each entry - but I see no sense for a transaction control here.
OK I could make my own timer routine or flush only each 10th entry...

You see this small overhead with how much connections? I have no small
example. I run a lot of procedures at the same time (all as used in all day
work, like inserting BLOBs, Pictures, deleting, generating invoices,
inserting appointments, deleting them...

Regards
Fabian 

-----Ursprüngliche Nachricht-----
Von: valentina-beta-bounces at lists.macserve.net
[mailto:valentina-beta-bounces at lists.macserve.net] Im Auftrag von Ivan
Smahin
Gesendet: Freitag, 20. April 2012 12:42
An: Valentina Beta
Betreff: Re: Journaling


On Apr 19, 2012, at 9:21 PM, Ruslan Zasukhin wrote:

> On 4/19/12 5:03 PM, "Fabian Kneubuehl" <support at ysd.ch> wrote:
> 
> Hi Fabian,.
> 
>> That makes things a bit complicated. If I never call flush at all and 
>> the user’s PC crashed at the end of the day he loses all his entries?
> 
> May be... Ivan?
> 

Yes, currently it is possible. But take into account that rollback journal
is about to rolling back all "dirty" changes in the db in order to get the
db in consistent state after any crashes or other abnormal events.

After Db.Flush() disk image of the database has no "dirty" changes  - so you
may use this as a temporary replacement of commit procedure.


> You MUST call flushes.
> 
> As well as working with transctions you must do
>    START TRANSACTION
>    COMMIT
> 
> And sometimes even write logic for ROLLBACK.
> 

Just later, when transactions will be implemented, you will call commit
instead of flush.

> 
>> Personally I would prefer a flush after each UPDATE/INSERT/DELETE as 
>> in our current version but because simultaneous journaling slows down 
>> these operation
>> 10 times I should think about disabling journaling – except you can 
>> minimize the overhead for both operations at the same time (flush 
>> each change and journaling).
> 
> We will check yet this timing ....
> I am not sure this is right ...
> May be something should be improved ...
> 

The latest benches for different kind of insert/update/delete shows 0-15%
overhead.
Could you send me some test app to see that 10-times overhead?

--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com

_______________________________________________
Valentina-beta mailing list
Valentina-beta at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina-beta



More information about the Valentina-beta mailing list