Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to make it faster ?
Message
 
 
À
26/02/2001 09:33:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00479477
Message ID:
00479496
Vues:
38
Hi!

Try following query:

SELECT A.F1, A.F2, B.F1 ;
FROM A INNER JOIN B ;
ON A.F1 = B.F1
WHERE B.F2 = "1234" ;
INTO CURSOR mytemp

I guess it makes no difference, but who knows.
In addition, filtered indexes are never used in the Rushmore optimization, so avoid it at all cost, include never use the 'deleted()' filter.


>>Hi,
>> I have 2 tables A, and B. Table A may contains 5000 records and B may contain more than 20,000 records (but just 3 fields - Total 30 Bytes). I have the SQL SELECT as the following:
>>
>>
>>
>>SELECT A.F1, A.F2, B.F1 ;
>>FROM A, B ;
>>WHERE B.F2 = "1234" AND A.F1 = B.F1 ;
>>INTO CURSOR mytemp
>>
>>Indexes:
>>A - F1 (Primary FILTER), F1 (Regular)
>>B - F1 (Regular), F2 (Regular)
>>
>>
>>
>>The SQL above take 15 seconds to load 5000 matched records from server trough 10BASET LAN. Is it acceptable? Is it possible to make it faster?
>>
>>I did try the following SQL, it take < 7 seconds to load 5000 from table B.
>>
>>
>>SELECT B.F1 FROM B WHERE B.F2 = "1234" INTO CURSOR mytemp
>>
>>
>>
>>What do I do wrongly for my 1st SQL?
>>
>>Thank you
>
>Looks to me like your SQL is fine. Check out the SYS(3054) function to see your query optimazation level. Also, be sure the stucture of a.f1 matches b.f1 to make sure rushmore is fully optimized.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform