Selection to Array: SQL vs 4D
Neil Dennis (10/30/08 2:53PM)
Neil Dennis (10/30/08 2:53 PM)
I performed a selection to array on 9,000 records using 4D v11.2
(hotfix 4) using SQL statements and 4D statements. I thought others
might be interested in my findings.
LAN (Same subnet)
4D - 0.48 seconds
SQL - 2.9 seconds
WAN (Another office to My Office, about 30 miles apart)
4D - 18 seconds
SQL - 13 seconds
So on a LAN 4D queries and selection to array out performs the
equivalent SQL by a factor of about 6. On a WAN SQL out performs 4D.
Here is the 4D Code
ALL RECORDS([Plant])
SELECTION TO
ARRAY([Plant]Name;aPlantName;[Plant]PlantID;aPlantID)
Here is the SQL Code
Begin SQL
SELECT Name, PlantID FROM Plant INTO :aPlantName,
:aPlantID;
End SQL
Neil
--
Neil Dennis
4D Developer since 1990
GreaText - Designing Software for the Way You Work
25 Holly Lane
Farmington, NH 03835
mailto:ndennis@...
http://www.greatext.com/
Reply to this message
Summary created 10/30/08 at 2:39PM by Intellex Corporation
Comments welcome at: feedback@intellexcorp.com