Speeding up UpdateRecord

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sun Jan 12 10:53:52 CST 2014


On 1/12/14, 8:03 AM, "Beatrix Willius" <bwillius at gmx.de> wrote:

Hi Beatrix,

> Oh my. You are correct, but this is waaaayyyyy horrible performance. For a
> measly field with 11 MB in 1000 records???? And now Instruments tells me that
> IndexChanges = false takes 60%.

I think you mean 
    IndexChanges = true

Because this do in fact  Table.Reindex.


Well, may  be in your case, no need reindex other fields of table.
Then use not Indexchanges feature, just

    drop index for that single field,
        do your job
    set field to be indexed again -- this rebuild index back.


> Now I know why indexing takes so very long. I had wondered before because I
> only index half a dozen fields or so. Is this considered normal and acceptable
> speed?

You have not just indexing.
You have index by words of emails.

I think I have see once your db,,,
A letter could be e.g. 500 - 2000 words.
This means that in fact engine need touch index 500-2000 times.

You say ONE Record. But in fact this looks like 500-2000 records for e.g.
numeric field.

So yes, this is hard operation.

 
> Unfortunately, my database doesn¹t have the usual entry pattern where a user
> enters a tiny bit of data and the index can be updated for this record. I¹ve
> got lots and lots of data. When you update a couple of records and then have
> to update the index, this takes far too long.

Wait a moment.

You told us in first letter of this thread, that you
    update ALL records in table for that field.

Now you say about couple of records.

NO NEED drop index, if you touch only couple of records.
But if you touch a lots and even all records -- then drop index.


 
> On 11.01.2014, at 20:00, Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com>
> wrote:
> 
>> This field is indexed by words, yes?
>> 
>> * I think main time eats indexing of each your update.
>> 
>> 
>> * When you make big changes over table, it is good idea to disable index
>> operations.
>> 
>> In the past we did this via
>> 
>>     field.Indexed = false
>>          big  job
>>     field.Indexed = true
>> 
>> 
>> * But about 3-4 years ago, we have added feature
>> 
>>      Table.IndexChanges = false
>>          big  job
>>      Table.IndexChanges = true
>> 
>> This allows to disable index operations on all fields of table.
> 
> Mit freundlichen Grüßen/Regards
> 
> Trixi Willius
> 
> http://www.mothsoftware.com
> Mail Archiver X: The email archiving solution for professionals
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 

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