Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Update vs REPLACE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQL Update vs REPLACE
Divers
Thread ID:
00452757
Message ID:
00452757
Vues:
96
I am modifying an application that has many instances of multiple
REPLACE commands to update tables, such as


replace field1 with "value1"
replace field2 with "value2"
replace field3 with "value3"


I want to speed this application up. So I considered:

UPDATE MyTable;
 SET Field1 = "Value1";
   Field2 = "Value2"
   Field3 = "Value3"


Since REPLACE starts at the first record, the 3 separate REPLACE commands
therefore make 3 passes through the table, while the SQL Update goes through
the table only once.

However, the Hackers Guide says the SQL Update is slower than REPLACE. Isnt
REPLACE 'old school' and SQL 'optimized'?

What are the Pros and Cons of each method?

Thanks
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform