Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not optimized
Message
De
15/02/2010 14:28:44
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01449210
Message ID:
01449223
Vues:
46
>>>The following is very slow, presumably because of my use of IN
Select * From KTrackTagDetail							;
>>>	where (Seqno In (Select Seqno From C_Kits)			;
>>>	or SeqnoFG In (Select Seqno From C_Kits))			;
>>>	and Left (RecordType,2) # 'AP'						;
>>>	into Cursor C_Detail
>>>So, how can I speed this up?
>>>
>>>Thanks
>>
>>
>>Try ONE left join insstead of two select queries
>>
>>
>>Select * From KTrackTagDetail ;
>>	left join C_Kits on (  KTrackTagDetail.Seqno ==  C_Kits.Seqno ) ;
>>		or    (  KTrackTagDetail.SeqnoFG ==  C_Kits.Seqno ) ;
>>	where (  Left (RecordType,2) # 'AP' ) ;
>>	    and ( C_Kits.Seqno is not null )
>>
>
>
>
>LEFT JOIN could return more records than you want :-)


yes

>BTW instead of LEFT JOIN and WHERE .. IS NOT NULL I would use INNER JOIN (the note above is also valid here :-))))))


yes

Need a join on ( select distinct Seqno from C_Kits)

But I've had it for the day - My secretary will chime in - no doubt
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform