[V4WS] question on deleting records

Luca Porfiri liste at mail.sting.it
Sat Mar 15 01:01:23 CST 2003


Hi Ruslan and everyone,

I am searching for hints on deleting records from a very big BaseObject with
a very big index.
Let me describe how big:

the db is
.blb = 1,57 Gb
.dat = 425 Mb
.ind = 253 Mb

the main BaseObject has 230.000 record and the amount of index depends on
this BaseObject.
Every day I update the db and index with 4Mb of data ca.
The index is big enough to contain, at now, 98% of words contained in the
new records I go to add to db and WS + Valentina update is very fast at
least.
I use this procedure:

read all the file to import
split it by record using \r to know number of records
then i repeat for every record:
   make a cursor with all fields I will populate
   select with itemAt the record in the list of records I want to process
   split it in fields (using tab in the text of record as separator)
   then valSetBlankRecord
   then valAddRecord and valSetField fields with values of the fields in
record to add
   finally valUpdateRecord
and back again to the next record and so on ...
It's fast enough to add and update also the indexes ... could we do better?

NOW

I need to delete old records but I fear it because delete records means
update also indexes and this operation, I believe, is not so fast as adding
records (but why?) I believe, instead, it could be very very slow ... or
not?
So could it be a way to do this fast?
Is better to select little cursors and deleteAll or delete record by record
or other?

Bye!

luca 


More information about the Valentina mailing list