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
---

_______________________________________________
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/cabqednvr8-mfre3t0z6oh_o39vpdtbarjsjkzg-ln5jof2p...@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