Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
FILTER is notoriously slow when selecting a few records from a large table. You might try the following code in the SET FILTER CLICK event:
IF region = "WDC" OR REGION = "SBF"
SELECT maintable
SET FILTER (etc. the way you are doing it now)
ELSE
SELECT maintable
SET ORDER TO region
COPY STRU WITH CDX TO tempfile && Create a temporary data source
SELECT maintable
SEEK "CHIGAGO"
DO WHILE region = "CHICAGO" AND NOT EOF() && Copy all Chicago records
SCATTER MEMO MEMVAR && to the temporary file
SELECT tempfile
APPEND BLANK
GATHER MEMO MEMVAR
ENDDO
ENDIF
Then refresh the gridsource information to point to either the original maintable or tempfile.
Not fancy but it will be MUCH faster.
Regards,
Rudy
Précédent
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