Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lesser records to retrieve - longer time?
Message
De
20/06/2006 16:04:51
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01130252
Message ID:
01130355
Vues:
33
>>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform