Subject very slow performance with tib_lookupcombo
Author Hundri Magusin
This is driving me up the wall :-(

I've got a tib_lookupcombo and each time I try to modify an unrelated field
of the parent, everything slows down for a while and the monitor shows
several detail fields (i.e. of the looked up dataset) being fetched. Once
the item is selected from the combo, everything works as expected again.
(desperate) help please!

Tks,
Hundri
------


How my dfm looks (some redundant fields snipped):

// The combo..........
object CustCombo: TIB_LookupCombo
DataSource = dsSQLCustList
AutoDropDown = True
ColLines = True
DisplayField = 'full_name'
IndicateTitles = True
RowLines = True
OnCloseUp = CustComboCloseUp
OnNotInList = CustComboNotInList
end

// Combo has to be populated by this:

object SQLCustList: TIB_Query
ColumnAttributes.Strings = (
'FULL_NAME=NOCASE=full_name_ucase'
'LOCALITY_NAME=NOCASE=locality_name_ucase')
DatabaseName = 'test'
FieldsGridLabel.Strings = (
'FULL_NAME=Name'
'TELEPHONE=Tel'
'LOCALITY_NAME=Locality')
FieldsDisplayWidth.Strings = (
'FULL_NAME=206'
'LOCALITY_NAME=101')
FieldsReadOnly.Strings = (
'TELEPHONE=NOEDIT;NOINSERT'
'LOCALITY_NAME=NOEDIT;NOINSERT'
'ID=NOEDIT;NOINSERT')
FieldsVisible.Strings = (
'ID=FALSE')
IB_Connection = WDM.masterdb
SQL.Strings = (
'select '
' ID, FULL_NAME, TELEPHONE, LOCALITY_NAME'
'from customers'
'')
AutoFetchFirst = False
CheckRequired = False
ColorScheme = False
KeyLinks.Strings = (
'customers.id=posdetail.customer_link')
KeySource = dsSQLDetail
MasterSearchFlags = [msfSearchAppliesToMasterOnly]
OrderingItemNo = 1
OrderingItems.Strings = (
'FULL_NAME=FULL_NAME;FULL_NAME DESC'
'TELEPHONE=TELEPHONE;TELEPHONE DESC'
'LOCALITY_NAME=LOCALITY_NAME;LOCALITY_NAME DESC')
OrderingLinks.Strings = (
'FULL_NAME=ITEM=1;POS=2'
'TELEPHONE=ITEM=2;POS=2'
'LOCALITY_NAME=ITEM=3;POS=2')
PreparedEdits = False
PreventEditing = True
PreventInserting = True
ReadOnly = True
RefreshOnParamChange = False
SearchedEdits = False
SearchedDeletes = False
SearchingLinks.Strings = (
'FULL_NAME=FULL_NAME'
'TELEPHONE=TELEPHONE'
'LOCALITY_NAME=LOCALITY_NAME')
BufferSynchroFlags = []
FetchWholeRows = True
Left = 28
Top = 372
ParamValues = (
'OLNK_FULL_NAME=')
end


// Parent dataset
object SQLMaster: TIB_Query
ColumnAttributes.Strings = (
'CUSTOMER_NAME=COMPUTED'
)
DatabaseName = 'test'
IB_Connection = WDM.masterdb
SQL.Strings = (
'select '
' ID'
' , POSMASTER_LINK'
' , CUSTOMER_LINK'
' , Customer_Name' <--- Filled in via trigger
''
'from posdetail p')
CallbackInc = -1
CheckRequired = False
ColorScheme = False
GeneratorLinks.Strings = (
'id=posdetail_gen')
KeyLinks.Strings = (
'POSDETAIL.ID')
KeyLinksAutoDefine = False
MasterSearchFlags = [msfOpenMasterOnOpen, msfSearchAppliesToMasterOnly]
PreventSearching = True
RefreshAction = raKeepDataPos
RequestLive = True
SearchedEdits = False
SearchedDeletes = False
BufferSynchroFlags = [bsAfterEdit]
FetchWholeRows = True
end