Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Very slow result in report
Message
De
12/02/2005 14:18:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00985559
Message ID:
00986322
Vues:
22
>Fabio, I respect your opinion, but on what did you base this?

Hi Lisa,
it is simple, with your code.

>
>I just tested again with COUNT FOR and = (in 7, 8, and 9). I realize that the timings would be different -- there would not be as noticeable a time difference if SET EXACT was ON -- but that fact would not necessarily prove that both statements were using the index <s>. (FWIW: COUNT in itself works a little differently than other scoped commands with result to optimization, if I remember correctly, although I don't know if that's relevant to the point you were trying to make.)

With = ( set exact on off ) VFP optimize a pure FOR conditon
is on the left that to right side.

It is relevat, COUNT,SUM,CALCULATE,AVERAGE are fully optimized
when the optimization index is the current order,
LOCATE,SCAN,REPLACE,SET FILTER... are partially optimize ( look LOCATE )
( this is a serious bug/lack of the VFP DBASE engine optimization).
ACTIVATE SCREEN
CLEAR
CLOSE TABLES all
SET TALK OFF

* set exact don't change
*SET EXACT OFF
SET EXACT ON

CREATE CURSOR priceanalysis  (artform C(10))
FOR K=1 TO 1500000
	APPEND BLANK
NEXT
INSERT INTO priceanalysis  VALUES ("L")

INDEX ON artform  TAG ixartform

? "count ="
s = SECONDS()
COUNT FOR artform = "L"
s1 = SECONDS()
COUNT  FOR "L" = artform
s2 = SECONDS()
* next don't use index sure
COUNT NOOPTIMIZE FOR "L" = artform
s3 = SECONDS()

? "left field:", s1-s
? "right field:", s2-s1
? "without rushmore SURE :", s3-s2

?
? "count =="
s = SECONDS()
COUNT FOR artform == "L"
s1 = SECONDS()
COUNT  FOR "L" == artform
s2 = SECONDS()
COUNT NOOPTIMIZE FOR "L" == artform
s3 = SECONDS()

? "left field:", s1-s
? "right field:", s2-s1
? "without rushmore SURE :", s3-s2

?
? "locate ="
s = SECONDS()
LOCATE FOR artform = "L"
s1 = SECONDS()
LOCATE  FOR "L" = artform
s2 = SECONDS()
* next don't use index sure
LOCATE NOOPTIMIZE FOR "L" = artform
s3 = SECONDS()

? "left field:", s1-s
? "right field:", s2-s1
? "without rushmore SURE :", s3-s2

SET ORDER TO 
?
? "locate = with tagno=0"
s = SECONDS()
LOCATE FOR artform = "L"
s1 = SECONDS()
LOCATE  FOR "L" = artform
s2 = SECONDS()
* next don't use index sure
LOCATE NOOPTIMIZE FOR "L" = artform
s3 = SECONDS()

? "left field:", s1-s
? "right field:", s2-s1
? "without rushmore SURE :", s3-s2
<snip>

I agree for SELECT SQL,
but VFP SQL ENGINE don't uses SET EXACT.

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform