Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lesser records to retrieve - longer time?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01130252
Message ID:
01130355
Views:
30
>>>>Index your Employee_Queue_Schedules by iActive_Flag and see if this speed this SELECT up. I hope you have index by cTrans_Employees_Queues_fk in Employee_Queue_Schedules.
>>>
>>>I don't want to add an index on this integer field which has only 1 and 0 values.
>>>
>>>We have indexes on every fk and pk.
>>
>>Then why no optimisation for this table?
>
>Because it doesn't participate in WHERE condition.
CREATE CURSOR cTest (Fld1 I, Fld2 C(20))
FOR asd = 1 TO 20
    INSERT INTO cTest VALUES(asd,TRANSFORM(asd))
NEXT
INDEX ON Fld1 TAG cTest
SET ORDER TO 
CREATE CURSOR cTest1 (Fld1 I, Fld2 I, Fld3 C(20))
FOR asd = 1 TO 20
    INSERT INTO cTest1 VALUES(asd,asd,TRANSFORM(asd))
NEXT
INDEX ON Fld1 TAG Test1
INDEX ON Fld2 TAG Test2
SET ORDER TO 
SYS(3054,12,[tte])
SET DELETED OFF
SELECT * FROM cTest;
LEFT JOIN cTest1 ON cTest.Fld1 = cTest1.Fld1 AND cTest1.Fld2= 10;
WHERE cTest.Fld1 = 1;
INTO CURSOR ccTest
MessageBox(tte)
cTest1 also doesn't participate in WHERE clause.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform