Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexing Daydream
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00213836
Message ID:
00213945
Vues:
39
>>1. Build temp table from definition
>>2. Index temp table (define indices before import)
>>3. Import new data (Fox updates all indexes simultaneously in background)
>>4. Rename old table
>>5. Rename temp table to live table name
>
>This will be a pig. Creating the indices before appending the million + records will cause VFP to have to update every index as it is adding records. He's done about all he can do with the exception of putting this in the NT scheduler and making it happen automatically.

After I posted it, I had a huge "what was I thinking?!"

I know the well known performance tip is to remove indices before a large APPEND (or any other type of import?) and re-create them afterward.

In my defense, I was thinking along the lines of Ken's initial "daydream", and thinking that the steps as I outlined them were close to what he was asking for in that message, something which simultaneously updated all the indices for each record, rather than looping through all records several times as each index is created. The only trouble is, the simultaneous updating is much slower.

Please forgive my Friday A.M. mental lapse...

Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform