Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling indexes for a moment
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00543126
Message ID:
00543187
Vues:
24
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I have a file with lots of indexes. I have to append couple of files into this file. I'm using APPEND FROM command to append. This operation is very slow due to the indexes. Is there a simple way of "disabling" indexes for a moment?
>
>I'm thinking about renaming cdx temporary, do append operation, rename it back and do reindex. But it sounds like klugy approach, besides, file will give an error in attempt to open it.
>
>Can you suggest something here? It's for VFP6.0.
>
>Thanks in advance.

Nadya,

I really think that the answer to your question may be several things. First, when appending a large number of records, having multiple indexes in place will significantly slow things down. What I did (several years ago) was to issue a DELETE TAG ALL prior to the append, then re-build the indexes. This is much faster. Fortunately, since all my systems can re-build their indexes on demand, I didn't have to write any special code for this, since the necessary information was stored in a table.

Secondly, field and record validation rules can also significantly slow things down. If simply deleting the indexes isn't sufficent, then I'd drop the table from the DBC, and re-add it when done. Naturally, you'll have to programmatically restore the validations rules afterward. However, it might be a good idea to create some sort of method to do this for all systems so that the tables can be re-created if necessary.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform