> Le 29 sept. 2016 à 21:04, Kirk Brooks <[email protected]> a écrit :
> 
> [...] you will need to examine how you do such queries and probably
> modify code. Execute on server is vital. [...]

Some examples, to illustrate… 

Never use While(not(end of selection()))

I had to display or print many pictures (a kind of catalog), those being stored 
on the 4d server machine, out of the data. Getting them by number (EoS 
function: read N pictures, put them in a blob, return the blob, extract 
pictures on client) instead of one by one dramatically decreased display or 
printing time. 

During the On load of a record, we often have to load "parent" records: 
  query(parent1;...)
  query(parent2;...)
  query(parent3;...)
    //3 queries at last
Draw and use 4D relations instead:
  SET FIELD RELATION(foreignKeyParent1;automatic;do not modify)
  SET FIELD RELATION(foreignKeyParent2;automatic;do not modify)
  SET FIELD RELATION(foreignKeyParent3;automatic;do not modify)
  RELATE ONE([currentTable])
    //1 query

And (again!) put yourself in deployment situation, you'll never learn as fast 
as this how to use 4D server through a WAN. 

-- 
Arnaud de Montard 

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to