[V4RB] updating records ... where am i going wrong?
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon May 12 23:58:32 CDT 2003
on 5/12/03 10:25 PM, Pedro fp at lists at pedro.net.au wrote:
Hi Pedro,
I have CC this to RB list because few days ago somebody have interested if
Valentina get its speed because it keep its data in RAM.
I already have answer that Valentina is true DISK-based database.
And what you say in the next paragraph (if I correctly read your English)
sounds impressive as for me.
For guys who don't know, Panorama is TRUE RAM-based database, i.e. It keep
its data totally in RAM. And as I read, Pedro say that Panorama is hundreds
times slower of disk-based Valentina.
Pedro, I read it correct?
> Than you Ruslan Update() worked a treat, but your example was wrong, it
> should have been b = c.Update ;) ... & thank you also for telling me
> where I do well :) ... I got that from reading your docs :)
>
> As an experiment I set Panorama, which I'm an old fan of, to work
> recalculating the durations for me just before writing my plea for
> help. I wrote your email, got your reply, acted on it, tested it, found
> it worked & did the job of 98947 records & Panorama hasn't got half way
> through it. Here's the job report ...
>
> 98947 records imported.
> Import completed in 25.254 seconds.
> Durations calculated in 42.940 seconds.
> Populate StyleGrid completed in 95.533 seconds.
1) btw, why StyleGrid so slow? You put here all 98000 records?
Why not as in active list?
2) what version of Panorama you have use? Optimized for PPC?
Even if not, optimization for PPC hive 4 times speed up only.
3) so it sounds that Panorama have made only 45000 records in about
70-80 minutes ???
> On Tuesday, May 13, 2003, at 04:56 AM, Ruslan Zasukhin wrote:
>
>> Pedro, I think for you task you should simply use Update()
>>
>>
>> dim i As integer, c As vCursor, b As boolean, nNew, nCur As double
>> dim newPhase, newDuration As vDouble
>>
>> c = mDatabase.SQLselect( "SELECT phase1, duration FROM moon ORDER BY
>> phase1" ) ' WHERE RecID > 0
>>
>> if c.recordCount > 0 then
>>
>> ' Assign cursor fields to variables.
>> newPhase = c.doubleField( "phase1" )
>> newDuration = c.doubleField( "duration" )
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ VERY GOOD :-)
>>
>> for i = 1 to ( c.recordCount - 1 )
>> c.currentPosition = i + 1 ' Go to the record ahead.
>> nNew = newPhase.value ' Get the next new moon.
>> c.currentPosition = i ' Go back to the current record.
>>
>> nCur = newPhase.value ' Get the current new moon.
>> newDuration.value = nNew - nCur ' Set duration as the
>> difference.
>> c.Update()
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list