ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: USE .... NOREQUERY 1   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

sam. 09 mai 2015, 11h27
Jean à Grenoble
atoutfox.public.association

Re: USE .... NOREQUERY 1

j'ai fait un petit test pour voir si c'est vraiment plus rapide (la BDD et la
table sont sur le disque local (pas de réseau)) :

lcannee = "W"
SET DATASESSION TO 1
SELECT 0
USE tarifs_cantine
SELECT 0
USE elvloc!tarifs_cantine_1an_liste ALIAS tc1al1
SET DATASESSION TO 5  && c'est celle de THOR
SELECT 0
USE tarifs_cantine AGAIN
SELECT 0
lndeb1 = SECONDS()
FOR m.lnaccu = 1 TO 1000
  USE elvloc!tarifs_cantine_1an_liste ALIAS tc1al2
  USE
  = SYS(1104)
NEXT && m.lnaccu = 1 TO 1000
lnfin1 = SECONDS()
lcresult = "sans norequery:"+ STR(m.lnfin1 - m.lndeb1, 10, 4)
? m.lcresult
_cliptext = m.lcresult
SELECT 0
lndeb2 = SECONDS()
FOR m.lnaccu = 1 TO 1000
  USE elvloc!tarifs_cantine_1an_liste ALIAS tc1al2 NOREQUERY 1
  USE
  = SYS(1104)
NEXT && m.lnaccu = 1 TO 1000
lnfin2 = SECONDS()
lcresult =  " avec norequery:"+ STR(m.lnfin2 - m.lndeb2, 10, 4)
? m.lcresult
_cliptext = _cliptext+ m.lcresult
USE IN tarifs_cantine
SET DATASESSION TO 1
USE IN tc1al1
USE IN tarifs_cantine


resultat :
sans norequery: 2.5710 avec norequery: 0.8620

Ca vaut donc le coup !

Jean à Grenoble
Permalink : http://www.atoutfox.org/nntp.asp?ID=0000016347
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3