Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP8 OUTER JOIN evaluated before WHERE
Message
From
08/11/2002 14:28:32
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00720072
Message ID:
00720459
Views:
13
Here's a test program I came up with, if someone wants to check this out for themselves:

By the way, who how do I report a bug to the fox team, regaurding the beta? I'm probably overlooking some link somewhere, so could someone point it out to me? :)
*VFP 7 takes  8.395 seconds on my machine for the SELECT
*VFP 8 takes 25.894 (!) seconds on my machine for the SELECT

SET COLLATE TO "MACHINE"
SET EXACT OFF
SET ANSI OFF
SET DELETED ON

CLOSE DATABASES ALL

LOCAL I, nSec
CREATE CURSOR CALL (nFK I, dDate D)
CREATE CURSOR CLIENT (nPK I)
FOR I = 1 TO 5000
	INSERT INTO CLIENT(nPK) VALUES(RECCOUNT("client") + 1)
ENDFOR

FOR I = 1 TO 5000000 && 5,000,000
	INSERT INTO CALL(nFK,dDate) VALUES(;
		INT((RECCOUNT("client") + 50) * RAND()),; && This makes some non-matching records
		DATE() - (INT(RAND() * 50) + 1))
ENDFOR

SELECT CALL
INDEX ON nFK TAG nFK
INDEX ON dDate TAG dDate

SELECT client
INDEX ON nPK TAG nPK

nSec = SECONDS()
SELECT ALL;
	"" AS SomeData ;
	FROM CALL;
	LEFT OUTER JOIN CLIENT ON call.nFK = client.nPK;
	WHERE call.dDate > (DATE() - 7);
	INTO CURSOR TEMP
nSec = SECONDS() - nSec
?MESSAGEBOX(nSec)
USE IN TEMP
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform