Ok i am loading a combo box based on all the different users that are in a table. Basically setting up 3 combo boxes for filters based on the info in the table. there will be multiple entries with the same user but once i get the first one i add it and move to the next user. Im doing this with user-id system-ID and fileFrom.
Right now performance with no index isn't bad because few records are in there. But this table will fill up quick.
Here's how im Loading it. I need a better way.
I have no way of including and indexed field in the where clause though.
Here's my table.
Here are my indexes
Right now performance with no index isn't bad because few records are in there. But this table will fill up quick.
Here's how im Loading it. I need a better way.
Code:
DEFINE VARIABLE userName AS CHARACTER NO-UNDO.
ASSIGN cb-User:DELIMITER = CHR(10).
FOR EACH SystemTracker NO-LOCK BREAK BY SystemTracker.User-ID :
IF FIRST-OF(SystemTracker.User-ID) THEN
DO:
FIND User-File NO-LOCK WHERE User-File.User-ID = SystemTracker.User-ID NO-ERROR.
IF AVAILABLE User-File THEN
ASSIGN userName = trim(User-File.FirstName) + " " + TRIM(User-File.LastName).
cb-user:ADD-LAST(userName,SystemTracker.User-ID).
cntUser = cntUser + 1.
END.
END.
I have no way of including and indexed field in the where clause though.
Here's my table.
Code:
Table: SystemTracker
Order Field Name Data Type Flags Format
----- ------------------------------- ------------ ----- -------------------
10 TrackerID char i X(8)
20 System-ID char i X(20)
30 User-ID char i X(20)
40 Created-Date date 99/99/99
50 Created-Time char X(12)
60 Updated-Date date 99/99/99
70 Updated-Time char X(12)
80 Counter inte ->,>>>,>>9
90 FileFrom char i X(40)
100 Product char i X(8)
Here are my indexes
Code:
Table: SystemTracker
Flags Index Name St Area Cnt Field Name
----- ----------------------------- ------- --- ------------------------------
i-SystemUser 7 2 + System-ID
+ User-ID
p i-SysUserProdFile 7 4 + System-ID
+ User-ID
+ Product
+ FileFrom
i-TrackerID 7 1 + TrackerID