RevDB performance, can I do this better?

Greg Saylor gsaylor at net-virtual.com
Thu Apr 25 08:03:01 EDT 2002


Hello,

I am using the Valentina database with the revDB interface to it...

I have created a text file with a bunch of INSERT commands, there are 86
columns of data and about 1,000,000 rows in the database total, with the
"insert files" broken up to around 500 records each...  WHen I read one
of these files in and begin doing the insert it happens at about 1 record
per second....  I really don't think I can wait for 1,000,000 seconds to
do an update because the data gets refreshed weekly...

My code is something like this


put URL theFile into theData # theFile is the location of the data file
which is being worked on
put 1 into theCount
put the number of lines of theData into totalRecords
repeat foreach line theLine in theData
    put count+1 into theCount
    revDB_execute(gConnectionID,theLine);
    put theCount into field currentRecords
end repeat


The database currently has no index, but one of the fields is defined as
being "UNIQUE"....

I am very unfamiliar with both Revolution and Valentina so I don't know
if this is a problem in what I've done in Revolution, a problem with
Valentina, or a problem with with the revDB....

By the way, each insert is on it's own line.. I could not figure out how
to get the "bindings" to work yet and I'm not sure if it would help with
this issue anyways...

 -Greg






More information about the use-livecode mailing list