The first thing that springs to my attention is that you have selected data
from 3 tables but only joined 2 of them.  If the tblbillingaddr table (the
unjoined one) has a lot of records you will be creating a massive amount of
useless data that could be causing the apparent hang.

--
Jay

> -----Original Message-----
> From: hammerin hankster [mailto:[EMAIL PROTECTED]
> Sent: 06 July 2004 15:51
> To: CF-Talk
> Subject: Need Serious Help - query broken
>
> I've got the following query that hangs the MX ODBC service
> (at least I attempt to stop it after 20 minutes).
>
> <CFQUERY NAME="readesi" DATASOURCE="esidb1">
> SELECT DISTINCT tblmasterclients.ClientName,
> AliasName, AlphaPrefix, SiteID, Infinity, AuthCode, POBox,
> POBoxCombo, tblmasterclients.Comments, DID,
> SVCType, tblmasterclients.AcctStatus, PreparedDate, URL,
> TerminationReason, TerminationDesc, billingaddr,
> billingaddr2, billingstate, billingcity, billingzip,
> billingcontact, billingemail, billingphone, billingext,
> billingfaxnumber, billingcellnumber, legalname
>
> FROM  tblMasterClients, tblbillingaddr, tbllegaladdr
>
> where     tblmasterclients.clientname = tbllegaladdr.legalname
>
> and   tblmasterclients.acctstatus = 'A'
> OR      tblmasterclients.acctstatus = 'ACT'
>
>
>
> ORDER BY tblmasterclients.clientname
>
> The query seems simple enough but what's not obvious is the
> relationships between some of the tables.  If I posted a
> screen cap of the relationship, any chance I could get some help?
>
> Thanks!
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to