Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL - really slow. How can I speed it up-indexing?
I have such statements when adding production items to my table (ROLLS). These statements undoubtedly slow down the operation which varies from computer to computer, depending on it's speed, but is even relatively slow with a Pentium IV.
Is there anything I can do to really speed up the execution of these SQL statements and also not jeopordize theintegrity of the results?
SELECT * FROM ROLLS WHERE UPPER(ALLTRIM(cSTATUS))=="REJECTED" AND ROLLS.cWorkOrderID == SALEORDER_ITEMS.cWorkOrderNo ORDER BY nRoll INTO CURSOR tmpRejected
SELECT * FROM ROLLS WHERE UPPER(ALLTRIM(cSTATUS))=="ACCEPTED" AND ROLLS.cWorkOrderID == SALEORDER_ITEMS.cWorkOrderNo ORDER BY nRoll INTO CURSOR tmpAccepted
SELECT nWeight_Roll, ;
SUM(nWeight_Roll) AS nWeight_Skid, ;
SUM(nWeight_Roll_Metric) AS nWeight_Skid_Metric, ;
SUM(nUPerRoll) AS nUnits_Skid, ;
SUM(nFootage_Roll) AS nFootage_Skid, ;
cSkidID ;
FROM ROLLS ;
WHERE ROLLS.cWorkOrderID = SALEORDER_ITEMS.cWorkOrderNo ;
GROUP BY 6 ;
ORDER BY 6 ;
INTO CURSOR tmpSkid
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement