Subject RE: [IBO] Slow query question
Author Nico Callewaert
Hey Set,

Hope you still have some time for me ? :-)
First I've tested this interactively, and I must say that your
statement is executing faster then my JOIN. Strange, because everybody is
recommending JOIN's with IB ??
Second : I found what was the problem, very strange : when I delete all my
TIB_LookupCombo's from the form, it's preparing fast. Maybe there is a
problem with my design of the form. I will try to explain what I'm doing :
When a user is just "looking" at the data, I set the datasource of the
TIB_LookupCombo's to the main dataset "DEALER", and display for example the
description of the Language field, example "ENGLISH". When a user wants to
add or edit a record, I set the datasource of the TIB_LookupCombo to the
lookup table and I set the Keylinks, so the whole Language table is
displayed and the user can choose for example another language.
Now, my question is, instead of picking up all the Descriptions fields with
JOINS or SUBSELECTS from the lookup tables, is it better to open all the
lookuptables immediatly and work with Keylinks and remove the JOIN's ??
With a subselect, only one record is retrieved to the client, with KeyLinks,
there will be 6 queries open, and for every query, let's say an average of
50 records will be transfered to the client.

What do you think ???

Many thanks, Nico Callewaert
-----Oorspronkelijk bericht-----
Van: Svein Erling Tysvar [mailto:svein.erling.tysvaer@...]
Verzonden: dinsdag 3 april 2001 13:37
Onderwerp: Re: [IBO] Slow query question

use a TIB_MonitorDialog to find out exactly what is taking so long. It
doesn't sound like a problem with your query since it is fast
interactively. But, does it help if you change to using subselects (a shot
in the dark, your MonitorDialog will help infinitely in making a proper

SELECT DealerNo, Name, Contact, Alfa, Title, Address1, Address2, Zip,
Phone, Fax, E_Mail, Website, Comment, Vat, Country_EG, Reduction,
BankAccount, Foreign_BankCode, Foreign_BankName, Foreign_BankCity,
Foreign_BankSwift, General_Acc, Coin,
(SELECT B.Name FROM Country B WHERE B.Code = A.Country),
(SELECT C.Province FROM State_Prov C WHERE C.Code = A.State_Prov),
(SELECT D.DescrCoin FROM D WHERE D.Code = A.Coin),
(SELECT E.Descr_1 FROM Deliv_Cond E WHERE E.Code = A.Deliv_Cond),
(SELECT F.Descr_1 FROM Payment_Cond F WHERE F.Code =
(SELECT G.Language_Descr FROM Language G WHERE G.Language =
FROM Dealer A
WHERE DealerNo = :qDealerNo

Is it still as slow? Does your program use events?


Yahoo! Groups Sponsor

Click Here to Find Software Faster

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

[Non-text portions of this message have been removed]