Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dotnetpro database performance contest
Message
De
11/05/2007 19:13:00
Markus Winhard
Lauton Software GmbH
Nürnberg, Allemagne
 
 
À
11/05/2007 16:25:52
Information générale
Forum:
Visual FoxPro
Catégorie:
VFP Compiler for .NET
Divers
Thread ID:
01224231
Message ID:
01224879
Vues:
13
Hi Thomas,

>well, less lines should run faster at least in vfp...

I checked your suggestion and indeed having less variable assignments nearly cuts the CSV export time in half. I just left out STRTRAN() because the original STUFF() is a bit faster (only 0.03 seconds less at 500,000 records, but anyway ;-)).

This is the new CSV export code:
SELECT Table2
SCAN
  lcName = RTRIM( Name )
  lcStrasse = RTRIM( Strasse )
  FPUTS( m.lnFHandle, ;
    STUFF( m.lcName, RAT( " ", m.lcName ), 1, ", " ) +", "+ ;
    STUFF( m.lcStrasse, RAT( " ", m.lcStrasse ), 1, ", " ) +", "+ ;
    STUFF( RTRIM( Ort ), AT( " ", Ort ), 1, ", " ) +", "+ ;
    RTRIM( eMail ) )
ENDSCAN
OTOH this is only about 0.1 seconds faster than my original version but way worse to read. Part two of the contest (remove duplicates and create a table with a different structure) is still more than 17 seconds. The commands I used are INDEX ON...UNIQUE, COPY TO and SELECT...INTO TABLE.

Markus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform