Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's up with the UNION in VFP8?
Message
From
20/12/2002 09:10:47
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00734822
Message ID:
00734851
Views:
17
I haven't got version 7, we are bypassing it.

I don't think it is the UNION now, I'm having a similar experience with another select (contains joins).

It seems to be when I run selects from Fox for dos tables and JOIN them with VFP tables.

Kev

>Kevin,
>
>Is it much faster under VFP7? Did you try to run each select separately to see if UNION is responsible for slowdown? See if changing LEFT OUTER JOIN to JOIN speeds up query.
>
>>Hi
>>
>>I have a 2 UNION'd selects, that are taking an absolute age to process, I don't know if it is the SELECT generally, or if it's the UNION causing it.
>>
>>
	*Client Search
>>	SELECT UPPER(Client.Cl_Sname) AS Cl_Sname,;
>>		   UPPER(Client.Cl_Fname) AS Cl_Fname,;
>>		   Client.Cl_Dob,;
>>		   ALIAS.Al_Sname, ;		
>>		   NVL(Property.pr_addr1, SPACE(20)) AS Pr_Addr1,;
>>		   NVL(Property.pr_pcode, SPACE(8)) AS Pr_Pcode,;
>>		   Client.Cl_Ref ;
>>	  FROM Client;
>>	  LEFT OUTER JOIN Property  ;
>>	    ON Client.pr_code = Property.pr_code  ;
>>	  LEFT OUTER JOIN ALIAS  ;
>>	    ON Client.Cl_Ref = ALIAS.Cl_Ref  ;
>>	 WHERE UPPER(Client.Cl_Sname) = tcCl_Sname ;
>>	   AND UPPER(Client.Cl_Fname) = tcCl_Fname ;
>>	   AND DTOC(Client.Cl_Dob) = tcCl_Dob;
>>	   AND UPPER(Property.Pr_Addr1) = tcPr_Addr1;
>>	   AND Property.Pr_Pcode = tcPr_Pcode;
>>	 UNION ;
>>	SELECT UPPER(Client.Cl_Sname) AS Cl_Sname,;
>>		   UPPER(Client.Cl_Fname) AS Cl_Fname,;
>>  		   Client.Cl_Dob,;
>>		   Alias.Al_Sname,;
>>		   NVL(Property.pr_addr1, SPACE(20)) AS Pr_Addr1,;
>>		   NVL(Property.pr_pcode, SPACE(8)) AS Pr_Pcode, ;
>>		   Client.Cl_Ref ;
>>	  FROM Alias ;
>>	 INNER JOIN Client ;
>>	    ON Alias.cl_ref = Client.cl_ref  ;
>>	  LEFT OUTER JOIN Property   ;
>>	    ON Client.pr_code = Property.pr_code ;
>>	 WHERE ALIAS.Al_Sname = tcCl_Sname   ;
>>	   AND ALIAS.Al_Fname = tcCl_Fname  ;
>>	   AND DTOC(Client.Cl_Dob) = tcCl_Dob ;
>>	  INTO CURSOR recClientList;
>> 		 ORDER BY 1,2
>>
>>
>>Any ideas?
>>
>>Thanks
>>Kev
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform