Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does create sql view create bloat?
Message
 
 
À
16/07/1999 10:49:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00242308
Message ID:
00242314
Vues:
36
>I have a program that needs a special view of the remote database. To allow for changes in the remote database structure, I would like to re-create the view every time I run the program. (Maybe not the best way, but its expedient.)
>
>Will running CREATE SQL VIEW myview multiple times create a bloat? I remember that INDEX ON ... TAG MYTAG run a bunch of times without deleting the tag first would end up making the CDX file grow. Does the same problem exist with .dbc files?
>
>Thanks!

Every time you re-create a SQL view of the same name, the current records in the table that makes up the DBC all get deleted and new records for that view are inserted into the table. So, you you are bloating the table by deleting records and adding new ones. The problem is if you have made the view updatable, then by re-creating the view, you have just deleted all the update properties of the view. You can recreate them with dbsetprop and cursorprop functions, but this will wreak havoc on a multi-user system and is ill-advised.

If your concern is structure changes to the source tables of the view, you are still better off having a static view and recreating the views when you change source table structures. Or you could use SDT and let that do all the work for you.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform