Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set Relation Command
Message
De
17/06/2004 11:20:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/06/2004 01:28:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00914271
Message ID:
00914634
Vues:
18
>Thank you Mr. Zonneveld, The problem is i did not use a view or remote view. What i did was simply created two cursors and relate it. Is there a way that i can sort the child memory cursor on a different order?
>
>Hope you can help me on this. Thanks.

It is not worthwhile to try this with SET RELATION.

(Solution #1 - not recommended) I think it can be done, though, with an index that starts with the parent field, and continues with whatever you want to sort on.

(Solution #2) It is much better to use a view, and index it. A view is like an updatable query.

For example, suppose you have a table with 100,000 records. If you want the user to be able to sort on any column, or on combinations of more than one column, the only practical solution is temporary indices. With the first solution, you will have to create this temporary index on 100,000 records. This will be very slow.

If the child table has an average of 100 children for every parent, with a view (solution #2) the records will be fetched very quickly. Also, an index on only 100 records will be created very fast.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform