Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Improve a requery
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Improve a requery
Divers
Thread ID:
00818689
Message ID:
00818689
Vues:
59
Hi all,

How can i improve a requery ?


(Sample)
LOCAL dvstart,;
dvend


dvstart = DATE() - 6000
dvend = DATE() + 12000

Table1
NAME C(18)
dstart D(8)
dEnd D(8)


Table2 && Many Records
ddate D(8) && Unique dates
Categorie C(1)


A = SECONDS()
Select COUNT(Temp2.Categorie ) FROM Table1,Table2 WHERE BETW(  Table2.ddate  , dvstart , dvend ) AND;
BETW( Table2.ddate , Table1.dStart , Table2.dEnd )= .T;
ORDER By Temp2.Categorie GROUP By Categorie Into Cursor Temp
B=SECONDS()
WAIT WINDOW NOWAIT TRANSFORM( B - A , "9999.99999")

It 's slow !

What can i do ?

Index on DTOS(dstart) and DTOS(dend) and Dtos(ddate) don't improve.

bernhart
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform