Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Improve a requery
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Improve a requery
Miscellaneous
Thread ID:
00818689
Message ID:
00818689
Views:
58
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
Next
Reply
Map
View

Click here to load this message in the networking platform