infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
table lookup efficiency
System
Originally posted by Nora Katz
Does it make any difference (for searching) to put items in a table in numeric or alphabetic order? I'm concerned about some large tables that I need to build, whether it will slow the thread down significantly.
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Nora,
I have never tested this but I was told years ago that due to the hashing algorithm used to search the table the order does not matter.
However, from a maintenance and troubleshooting standpoint, I find having the table in a particular order to be valuable.
Jim Kosloskey
System
Originally posted by Nora Katz
Thanks for the info.
Yes, I agree, having the values in order makes for easier lookups also.
Is there a utility for loading values from a file into a Cloverleaf table?
Jim Kosloskey
Nora,
No. You need to write your own.
I have done this before - I wrote a Tcl proc to read in a delimited file (which was exported from a Database and FTP'd to Cloverleaf).
If you would like the proc, I will try to find it and send it to you. You will probably need to modify it for your purposes.
Jim Kosloskey
System
Originally posted by Nora Katz
Thanks, that would be great. I did create something, but it was not in tcl. But, I'm getting better at using tcl, so I think I can create something.
If you can find your file, it would give me a head start. No big rush.
Thanks again for your help.
System
Originally posted by Richard Hart
Nora.
We load the 'tables' into an array and access them this way - like Jim, we have a script which loads the data file into our tables. We use TCL for our translations and 'source' the tables and check their CVS id before using them. The example below is used by our clinical system for imaging.
proc ExamCode {aCode} {
# make the array global, so it is always available
global ExamCodeArray
#
# if the code is DATA_INIT then we initialise the array
#
if {[string equal $aCode DATA_INIT]} {
# ExamCode DATA_INIT START - do NOT remove this line
set ExamCodeArray(ABDO) "ABDO"
set ExamCodeArray(ABDOE) "ABDO"
set ExamCodeArray(ABDOENR) "ABDO"
set ExamCodeArray(ABDONR) "ABDO"
...
set ExamCodeArray(YWCWX) "YWC"
# ExamCode DATA_INIT END - do NOT remove this line
} else {
#
# set the return variable to the default value,
# in this case the original code
#
set myData $aCode
#
# make sure we don't fall over if there is NO data!
#
catch {set myData $ExamCodeArray($aCode)}
#
# return the data from the array
#
return $myData
};# end of if
}
...
ExamCode DATA_INIT
ExamTechnique DATA_INIT
ExamDelete DATA_INIT
#
# return OK
#
return 0