REINDEX

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Aug 30 10:52:55 CDT 2005


On 8/30/05 10:46 AM, "Florian Bogeschdorfer" <fb at memedia.de> wrote:

>> 
>> If Flush() the most important tool for preventing database corruption?
>> How often should I Flush()?  After every insert or ALTER or DELETE?
>> Should I build into my main db parent object a process that keeps track
>> of the number of changes and then run Flush() after a certain number of
>> changes?
>> 
>> How do you handle this, Florian?
>> 
> 
> Well, first of all, I do not use the SQL way to delete records, - I use the
> API way. But I am not that familiar with SQL like you look to be
> 
>> CREATE TABLE answers (
>     qRecId ObjectPtr REFERENCES questions ON DELETE CASCADE NOT NULL INDEXED
>      ...
> 
> Looks very complicated to me. Why not try the API way (build cursor,
> deleteAllRecords(cursor)) and see if your problem goes away...?

Florian, 

In fact above way is better, because it put more work on kernel
 
> About Flush: if I change or delete single records every now and then, I
> regularly do a FLUSH after each change in DB. This is built in my handlers.
> Why? Because this gives me the most safety and it does not take long.
> 
> But if I change or delete hundreds or thousands of records in a row, I have
> seen problems (at least with vServer) with the DB connection, so I made a
> special handler for this, FLUSHing only every 1000 records and at the end of
> the job. This is much faster anyway if you deal with so many records.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list