Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimization of a select
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00248842
Message ID:
00248900
Vues:
20
>Hi everyone,
>
>Here is my problem:
>
>I want to find when duplicated records are mistakenly created by my application.
>
>So I plan to check my database before the user gets into the application and after he/she exists.
>
>The database contains employee schedules. Each record contains the position number (PosNum), the date of shift (Djh) and a number indicating which day was used to generate that particular record (Njh). I have about 50,000 records.
>
>And this is the SELECT statement:
>
>    SELECT cHorPosNum, dHorDjh, nHorNjh, COUNT(*) AS CNT ;
>      FROM Horaire ;
>     GROUP BY cHorPosNum, dHorDjh, nHorNjh ;
>    HAVING CNT > 1
>
>
>The combinaison of cHorPosNum+dtos(dHorDjh)+str(nHorNjh,3) should be unique.
>
>I already have the following index tags:
>DHORDJH,
>CHORPOSNUM,
>CHORPOSNUM+DTOS(DHORDJH)+STR(NHORNJH,3)
>
>On a my pc it takes about 1.5 seconds to complete
>for my users are on a 10Bt network it will be longer but acceptable
>but for other users who are on a RNIS network it may be too long.
>
>Does anyone have an idea on how I can optimize this search.
>
>Remember this this is fpw 2.6 code.
>
>Thanks in advance

The article on Rushmore optimization on my web site may help.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform