Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SQL select and combining cursors/tables
Message
De
04/10/2001 12:10:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
04/10/2001 10:46:53
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00563768
Message ID:
00564234
Vues:
17
2 hrs ??? Actually I even don't expect it to take 6 mins with scan..endscan approach. SQLs use empty() which is not optimizable (I assume you had indexes on left(zip,5) and other - you might replace the !empty(trim(sddmdata.sdaddr)) expression with :
!(sddmdata.sdaddr == '') ).

scan approach does one single pass on one of tables (probably you'd want to choose 8500 recs one) and a do case check. It's almost equivalant to one 'optimized' SQL (preparation of indexes might take time - you might even skip that with one table usage with order set to left(zip,5) tag and do some locate while ...for ... But I think indexes + 3 use again would be faster).

You have unnecessary trimming in comparisons. Instead use set ansi and set exact. You might recover extra time doing so too (and possibly you dont need empty() at all).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform