Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Effect of Set Relation to in SQL?
Message
De
30/07/1997 09:36:35
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00042314
Message ID:
00042317
Vues:
33
>I was looking over an old program the other day. There were a series of SQL select statements that looked pretty solid. However, before these statements there was a Set Relation To between the same tables that the SQL is being preformed on. Will this degrade the performance of the SQL since the record pointer for the second table is now moving each time the parent table record pointer is moved?

Actually, in certain circumstances, I'm pretty sure it may make the SQL faster. Since Fox's SQL is so smart, it likes to think, but Fox is not a fast thinker, it's a fast worker. The more you tell it, the less it thinks and the more it works....(What the hell does that mean???)

It means, Fox will create indices and relations on the fly, if they don't already exist and they are required by the SQL. If all the necessary indices and relations are already set, then Fox recognizes them quickly and utilizes them and skips over the 'thinking' part of the SQL. I KNOW this for a fact for indices, particularly IDX's which Fox doesn't know who the owner is unless you tell it. I THINK this is true for relations, but I've never done an official benchmark.

Matt
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform