Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper Way To Check For Duplicate Primary Key
Message
De
25/06/2001 14:30:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00522709
Message ID:
00523129
Vues:
10
>>My situation is a bit different. I have a merge
>>application where I need to merge 10K to 100K
>>records at a time. I'm trying to find out if
>>anyone has done any benchmarks that indicate
>>which is actually the most efficient method of
>>checking for duplicates.
>>
>>   ...kt
>
>See FAQ about finding orphans. Could you show some code fragment? Assuming, you have one master table and you have to append from different sources, but only if you don't have already entered same values in the master table you can use scan with either keymatch (if appropriate) or indexseek conditon. It would be quite fast.


I think we're missing each other Nadya. I'm not trying to
find orphans (a child record with no parent), I'm trying
to find the most efficient way of determining whether 1)
an input record that I am about to add matches the PKey
or CKey of a record in my database or 2)if the result of
a change that I'm going to make will yeild a uniqueness
error.

The question in essance is whether it is more effieicent
to process it manually or allow VFP to handle it.

It doesn't look like anyone has done any benchmarking on
this so I will do some testing and post the results.

I appreciate your posts though.

   ...kt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform