On Wed, Nov 19, 2014 at 4:37 PM, Gene Wirchenko <ge...@telus.net> wrote:

> At 11:20 2014-11-19, Ted Roche <tedro...@gmail.com> wrote:
>
>> FoxPro is faster than you think.
>>
>> REPLACE ALL (placeholderfield) WITH RECNO()
>>
>> is practically instantaneous, for reasonable values of instant.
>>
>
>      Maybe not.
>
>      I did something similar just now on a table of about 110,000 rows,
> and it took three seconds.  Rafael might be dealing with a larger table.
> On Foxite, one poster has been wrestling with a three million row table.
>

You have a table, likely with indexes, and rewrote 110,000 rows, probably
to a hard disk. He's working with a cursor.

CREATE CURSOR fred (myresult c(10), therecno I)
FOR I = 1 TO 110000
  INSERT INTO fred values( "data", 0)
NEXT

REPLACE ALL therecno WITH RECNO() IN fred

Subsecond result, on an old Core2 processor with 4 Gb RAM.


-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4vdX5u6YuNmsH2L+PNLQxSZqrM2=n7no4fjjrfffox...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to