Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6.0 Optimize SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
VFP6.0 Optimize SQL
Divers
Thread ID:
00352764
Message ID:
00352764
Vues:
40
Hi All,

I'd like to speed up my sql select statement and have tried everything I could think of to make it "Rushmore" optimized, to no avail.

Here are two sql's, the first is slow, the second is fast.


***5,323 records in 40.03 secs.
select dam1, yr_bred, name, sex, sire1, booked_to, last_bred, p_b, date_foal, date_died, cause_deat, ;
price_sold, buy_name, age_rec, life_earn, cl from master where category = "F" and type = "S" or ;
type = "W" or type = "Y" order by dam1 into table foals nofilter


***378 records in 4.31 secs.
select name, yr_foaled, booked_to, yr_bred, age_rec, life_earn, sire1, dam1, sire2, date_acqui, purch_pric, bought_fro, hands, descript from master where category = "F" and type = "B" and ;
date_died = {} and date_sold = {} and yr_bred = 2000 order by name into table mare nofilter

The number of records returned doesn't seem to be a factor because I can revise the sql's to change the results set's numbers and the time to run remains about the same.

I know there's something wrong with the slow sql, but I need help figuring it out.

One thing I did try was to create an index tag in the cdx for deleted(), but it didn't help.

The files are indexed on the first field noted in the select.

Any ideas would be helpful and appreciated.

Thanks,

Jim Harvey
jharvey@netrax.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform