[V4RB] API Equivalent of UPDATE WHERE
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Jan 4 10:58:56 CST 2005
On 1/4/05 2:21 AM, "jda" <jda at his.com> wrote:
>> UPDATE WHERE is more powerful command although, because I can do with it
>>
>> SET f = f + 1 WHERE f > 10
>>
>
> Hm, is there a fast way to set the values of a numeric field to a
> sequence without looping through each record in a cursor? Say if
> there is 1000 records in the cursor, setting field id to
> 1
> 2
> 3
> 4
> ...
> 1000
>
> I do that now, but as I said, I loop through each record in a cursor
> and set the value. It works, but gets kind of slow when there are
> 5000-10000 records.
In normal dbs there is no such way.
You must loop. Or engine must loop.
Jon,
IMPORTANT:
* if you change MANY records, you may consider remove index.
not-indexed field give linear time for adding.
Btw, I have see that import of 50 records with PUB format,
You make with indexes ON.
Remove indexes, and I think import of 4000 records will be done not in 12
minutes but in few seconds.
--
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-beta
mailing list