Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need desperate help on rushmore optimization
Message
 
À
13/03/2006 14:44:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01103911
Message ID:
01103965
Vues:
15
Hi Greg,
Only try this code and see results...
CREATE TABLE Wotran01 (wono C(10), tranlineno N(4))
FOR m.cik = 1 TO 2
    FOR m.ijk = 1 TO 5000
        INSERT INTO Wotran01 VALUES(TRANSFORM(m.ijk),m.ijk)
    NEXT
NEXT
INDEX ON wono+STR(tranlineno,4,0) TAG Wotran01
m.lcwo = [1]+SPACE(9)

SET EXACT OFF
SET ANSI  OFF
SYS(3054,12,'mysql')

SELECT * from Wotran01 where wono+STR(tranlineno,4,0) = lcWo into cursor CopyWO
SYS(3054,0)
MESSAGEBOX([SET EXACT OFF and SET ANSI OFF]+CHR(13)+CHR(10)+mysql+CHR(13)+CHR(10)+[see result - good])
BROWSE NORMAL

SET EXACT ON
SET ANSI  OFF
SYS(3054,12,'mysql')
SELECT * from Wotran01 where wono+STR(tranlineno,4,0) = lcWo into cursor CopyWO
SYS(3054,0)
MESSAGEBOX([SET EXACT ON and SET ANSI OFF]+CHR(13)+CHR(10)+mysql+CHR(13)+CHR(10)+[see result - good])
BROWSE NORMAL

SET EXACT OFF
SET ANSI  ON
SYS(3054,12,'mysql')
SELECT * from Wotran01 where wono+STR(tranlineno,4,0) = lcWo into cursor CopyWO
SYS(3054,0)
MESSAGEBOX([SET EXACT OFF and SET ANSI ON]+CHR(13)+CHR(10)+mysql+CHR(13)+CHR(10)+[see result - wrong])
BROWSE NORMAL

SET EXACT ON
SET ANSI  ON
SYS(3054,12,'mysql')
SELECT * from Wotran01 where wono+STR(tranlineno,4,0) = lcWo into cursor CopyWO
SYS(3054,0)
MESSAGEBOX([SET EXACT ON and SET ANSI ON]+CHR(13)+CHR(10)+mysql+CHR(13)+CHR(10)+[see result - wrong])
BROWSE NORMAL
HTH

>Greetings,
>
>I've got a pretty serious performance issue with an accounting app (AccPac Manufacturing) utility.
>
>I need to query all transaction records for a given work order.
>
>Very simple example:
>
>SELECT * from Wotran01 where wono = lcWo into cursor CopyWO
>
>The problem is that there is no index specifically on wono and with several million records it is dead slow.
>
>There is however an index with the following structure: wono+STR(tranlineno,4,0)
>
>Because of the size of the table I'd rather not have to make an index specifically on wono unless it is abolutely necessary.
>
>So... Is there a way to query these transaction records so that I can get all the records for a cooresponding work order and ignore the tranlineno in the file but still get the benefit from the exiting compound index???
>
>Thanks in advance!
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform