Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Improve a requery
Message
 
 
To
10/08/2003 17:07:56
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00818689
Message ID:
00818755
Views:
17
Fabio,

I don't have improvement ....


Bernhart


>* exec without index, next try add index on ordered sequence, or reverse ( i don't understand data statistic )
>
>
>  SELECT Etats
>* INDEX ON ddebut TAG ddebut
>* INDEX ON dfin 	TAG dfin
>*1 INDEX ON ntype 	TAG ntype
>*2 INDEX ON nPoscat TAG nPoscat
>
>
>  SELECT DatesFiltred
>*  INDEX ON ntype  TAG ntypeIndex
>*  INDEX ON nPoscat TAG oscatIndex
>
>  SELECT Etats.nPoscat, ;
>    Etats.ccat_physiq  ,;  && ATTENTION, NOT GROUPED
>    Etats.ntype , ;
>    COUNT( DatesFiltred.ddate ) AS "Ncat" , ;
>    Etats.ltransfert  ;
>    FROM FORCE DatesFiltred JOIN Etats  ;
>    ON DatesFiltred.ddate BETWEEN m.D_debut AND m.d_fin; && this is VFP optimization for constant
>	AND Etats.nPoscat = DatesFiltred.nPoscat AND Etats.ntype=DatesFiltred.ntype ;
>	AND Etats.ddebut<=DatesFiltred.ddate AND Etats.dfin>=DatesFiltred.ddate  ;
>    GROUP BY  ltransfert , Etats.ntype , Etats.nPoscat ; && IMPLICIT ORDER ON VFP
>    INTO CURSOR Sum_Categ_per_periode
>
>
>or try:
>
>
>
>  SELECT Etats
>* INDEX ON ddebut TAG ddebut
>* INDEX ON dfin 	TAG dfin
>* INDEX ON ntype 	TAG ntype
>* INDEX ON nPoscat TAG nPoscat
>
>
>  SELECT DatesFiltred
>*1  INDEX ON ntype  TAG ntypeIndex
>*2  INDEX ON nPoscat TAG oscatIndex
>
>  SELECT Etats.nPoscat, ;
>    Etats.ccat_physiq  ,;  && ATTENTION, NOT GROUPED
>    Etats.ntype , ;
>    COUNT( DatesFiltred.ddate ) AS "Ncat" , ;
>    Etats.ltransfert  ;
>    FROM FORCE Etats JOIN  DatesFiltred ;
>    ON DatesFiltred.ddate BETWEEN m.D_debut AND m.d_fin; && this is VFP optimization for constant
>	AND DatesFiltred.nPoscat=Etats.nPoscat AND DatesFiltred.ntype = Etats.ntype;
>	AND DatesFiltred.ddate BETWEEN Etats.ddebut AND Etats.dfin;
>    GROUP BY  ltransfert , Etats.ntype , Etats.nPoscat ; && IMPLICIT ORDER ON VFP
>    INTO CURSOR Sum_Categ_per_periode
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform