I have a process that starts out with a table of about 4300 records. An
SQL select yields a cursor of only the records not already in a master
table for processing and gradual addition to the master table. When the
master table was empty my SQL results were sub second. Now that the master
table has about 1350 records in it the SQL process takes between 15 and 16
seconds. My initial thought was that indexing each field in the master
table should speed things up but that seems to have no effect.
Here is the code:
* Build a cursor of all records from the Receipts table that are not in the
Master table
SELECT *;
FROM Receipts;
WHERE (DTOC(dDate);
+ ALLTRIM(cName);
+ ALLTRIM(cType);
+ ALLTRIM(STR(nAmount,10,2));
+ ALLTRIM(cAccount);
+ ALLTRIM(cClass);
+ ALLTRIM(cJobCust);
+ ALLTRIM(cNumber);
+ ALLTRIMm(Memo);
+ cSplit_id;
NOT in;
(select DTOC(dDate);
+ ALLTRIM(cName);
+ ALLTRIM(cType);
+ ALLTRIM(STR(nAmount,10,2));
+ ALLTRIM(cAccount);
+ ALLTRIM(cClass);
+ ALLTRIM(cJobCust);
+ ALLTRIM(cNumber);
+ ALLTRIM(mMemo);
+ cSplit_id;
FROM Master));
INTO CURSOR Batch READWRITE
Suggestions welcome!
Thanks in advance,
Joe
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---