Dan, How many years does this table span? Do you need to keep all these records in an active table versus moving some records to a history table? it seems that CUSTNO, INVNO, AND IDTRANS should have a NOT NULL constraint applied.
CUSTNO should have a FOREIGN KEY reference to CUSTNO in the "Customer table" where CUSTNO shold be a primary key. Jim Bentley American Celiac Society [email protected] tel: 1-504-737-3293 ----- Original Message ---- From: Dan <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Thu, February 11, 2010 8:18:38 AM Subject: [RBASE-L] - Re: Speed issues sure, No Triggers, No functions, 3 indexes Custno, Invno, IDTrans (all unique numbers) 1 rule: Ardetail.INVNO IS NOT NULL AND NOT Ardetail.INVNO IN ( SELECT INVNO FROM Ardetail #T1 WHERE #T1.INVNO = Ardetail.INVNO ) Table: Ardetail No Lock(s) No. Column Name Attributes --- ------------------ ------------------------------------------------------ 1 CUSTNO Type : TEXT 6 Index : SINGLE-COLUMN 2 INVNO Type : TEXT 12 Index : SINGLE-COLUMN 3 SDATE Type : DATE 4 IDTRANS Type : TEXT 20 Index : SINGLE-COLUMN 5 INVAMT Type : CURRENCY Default: 0 6 INVCUR Type : CURRENCY Default: 0 7 PAYCUR Type : CURRENCY Default: 0 8 PAYAMT Type : CURRENCY Default: 0 9 CHKNO Type : TEXT 20 10 CHKDATE Type : DATE 11 CREDIT Type : CURRENCY Default: 0 12 SVCHARGE Type : CURRENCY Default: 0 13 CURBAL Type : CURRENCY Default: 0 14 AFTER30 Type : CURRENCY Default: 0 15 AFTER60 Type : CURRENCY Default: 0 16 AFTER90 Type : CURRENCY Default: 0 17 OVER120 Type : CURRENCY Default: 0 18 SCDROPPED Type : CURRENCY Default: 0 19 TOTSVCH Type : CURRENCY Default: 0 20 INVBAL Type : CURRENCY Default: 0 21 MONTHNO Type : INTEGER 22 SC_OK Type : TEXT 1 Default: Y 23 Posted Type : TEXT 1 24 SYEAR Type : INTEGER 25 SPERIOD Type : INTEGER 26 batchno Type : INTEGER Current number of rows: 100476 At 09:07 AM 2/11/2010, you wrote: > Please post the structure of your table, including a list of indexes, rules, > triggers, and constraints that apply. > -- > Larry

