KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Internal Optimizations to SELECTION TO ARRAY
PRODUCT: 4D | VERSION: 11.5 | PLATFORM: Mac & Win
Published On: March 8, 2010

New versions of 4D v11 SQL include optimizations which make SELECTION TO ARRAY more well rounded and improve its performance in client/server environments. These are important network optimizations.

Optimization One:

The size of packets for SELECTION TO ARRAY has been optimized when picture arrays are detected. This optimization allows 4D to save time during the transfer between client and server whenever SELECTION TO ARRAY is using an array of pictures.

Optimization Two:

Before, all the arrays were filled in one pass on the server side and sent at one time to the client side. For example, with a SELECTION TO ARRAY with 100,000 elements in each array, sample databases were shown to take up around 200 MB (outside the cache) on the server side. Twenty users simultaneously executing such a command could cause serious problems.

Now, SELECTION TO ARRAY splits the data (array’s elements) by blocks of 10 MB and sends these blocks one by one to the client. This allows 4D to never completely fill the heap memory on 4D Server.