Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index definition for fully optimizable view ?
Message
De
04/07/2002 21:56:09
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00675416
Message ID:
00675488
Vues:
10
Hi

You will need an INDEX ON SUBSTR(cart_num,1,5) TAG

Don't include the alias in the index expression.

>Hi All,
>
>How do i define an indextag to the following table to fully optimize my SQL-view ?
>The table contains about 1 million records so it needs to fully optimized or else
>it becomes to slow, at least over the network. I have tried different definitions
>but at its best i only get partial optimazation.
>

>Table: LogAL100
>Field Name Type Len
>
>cart_num C 8
>coperator C 5
>dtime T 8
>cmachine C 5
>clopnr C 6
>copnr C 3
>cstatus C 1
>corsak C 2
>cprgrupp C 3
>------------------------
>Total record size: 42
>

>

>SQL-view:
>
>
>SELECT *, SUBSTR(LogAL100.cart_num,1,5) AS artsort FROM reportit!logal100 ;
>WHERE Logal100.cart_num = ?vp_Artnum ;
>AND Logal100.coperator = ?vp_Operator;
>AND Logal100.cmachine = ?vp_Machine ;
>AND Logal100.cprgrupp = ?vp_Prgrupp ;
>AND Logal100.clopnr = ?vp_Lopnr ;
>AND Logal100.dtime BETWEEN ?vp_FromTime AND ?vp_ToTime ;
>ORDER BY 10, Logal100.copnr, Logal100.clopnr
>
>
>
>
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform