Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The WORST Query, Performance Killer
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00717891
Message ID:
00718166
Views:
18
You can make the quiery even slower by using UDF.
SELECT * FROM Temp ;
	WHERE ID IN ( ;
		SELECT ID FROM TEMP  ;
			WHERE ID IN ( myrand(), myrand())) ;
	INTO CURSOR c2		
FUNCTION myrand()
RETURN RAND()*100

>Maybe this time I have nothing important to do, so, I was thinking about a Query that could break your patient and system resources, can be this Query the Wrost <g>???
>
>
>   CREATE CURSOR Temp (ID i)
>   FOR I=1 to 600000
>       INSERT INTO Temp VALUES (RAND()*100)
>   ENDFOR
>
>   **** This is the Wrost Query ****
>   SELECT * FROM Temp WHERE ID ;
>        IN (SELECT ID FROM TEMP WHERE ID IN(RAND()*100, RAND()*100))
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform