Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select slow
Message
De
06/09/2006 03:50:35
 
 
À
30/08/2006 10:19:31
Suhas Hegde
Dental Surgeon
Sirsi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01149759
Message ID:
01151217
Vues:
39
>hi,
>
>i have a free table
>
> create table bhav_data.dbf free ;
> (symbol c(20),series c(20),open f(20,2),high f(20,2),low f(20,2),close f(20,2),;
> last f(20,2),prevclose f(20,2),tottrdqty f(20,2),tottrdval f(20,2),;
> sma9 f(20,4),sma12 f(20,4),sma26 f(20,4),RSI f(20,2),ROC f(20,2),;
> timestamp c(20),date d,delqty i,delpercent f(20,2))
>
>index on symbol,date,series
>
>Total number of records 360128
>
>when i run
>
>
>SELECT date,open,high,low,close,tottrdqty,sma9,sma12,sma26 FROM bhav_data;
>where symbol == m.THISVALUE INTO CURSOR tempDETAIL nofilter
>
>this takes abt 3 secs to run
>
>same when
>
>set exact on
>SELECT date,open,high,low,close,tottrdqty,sma9,sma12,sma26 FROM bhav_data;
>where symbol = m.THISVALUE INTO CURSOR tempDETAIL nofilter
>
>---- this too takes 3 secs
>
>But
>
>set exact on
>SELECT date,open,high,low,close,tottrdqty,sma9,sma12,sma26 FROM bhav_data;
>where symbol = m.THISVALUE and date =date() INTO CURSOR tempDETAIL
>
>SELECT date,open,high,low,close,tottrdqty,sma9,sma12,sma26 FROM bhav_data;
>where symbol = m.THISVALUE INTO CURSOR tempDETAIL nofilter
>
>this both combined runs under 1 secs
>
>why ?
>
>and how can i run
>
>set exact on
>SELECT date,open,high,low,close,tottrdqty,sma9,sma12,sma26 FROM bhav_data;
>where symbol = m.THISVALUE INTO CURSOR tempDETAIL nofilter
>
>run under 1 sec ???
>
>TIA
>
>suhashegde

An Index caching overload effect ?

try, and post this time:
use bhav_data
SET EXACT ON
=lOOKUP(symbol, m.THISVALUE,symbol)
SELECT date,open,high,low,close,tottrdqty,sma9,sma12,sma26 FROM bhav_data;
where symbol = m.THISVALUE  INTO CURSOR tempDETAIL nofilter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform