Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xbase commands Vrs Sql commands
Message
De
11/05/2005 04:34:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
11/05/2005 04:17:07
Suhas Hegde
Dental Surgeon
Sirsi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Divers
Thread ID:
01011885
Message ID:
01012745
Vues:
27
>>Do you have a specific SQL or xBAse code causing headache?
>
>ya,
>it is realated to code like this.
>
>
>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),timestamp c(20),date d,delqty i,delpercent f(20,2))
>
>
>with records 260000+
>
>and indexed on timestamp
>
>but this takes ages to complete on my laptop but on a less faster config it runs under .9 secs
>
>select dist timestamp from bhav_data into cursor test nofilter
>
>laptop AMD athlon XP prosser 1400 + ,128mbram,a damn slow hdd
>test mach . amd k6 500mhz 256mbram 5600rpm 40gb hdd.
>
>SO it gives more headachs on using SQL on that mach. where as the XBASE completes in 0.2 sec
>
>like this
>
>create test(t1 c(20))
>index on t1 tag t1
>select bhav_data
>scan for !seek(timestamp,'test','t1')
>insert into test values(bhav_data.timestamp)
>endscan
>
>As for the other mach. SQL runs under 1 sec so my laptop is the problem.
>
>thanx
>suhashegde

HW part sounds having some role in it. Putting it aside DISTINCT is not something I'd suggest at all. In my earlier tests just using DISTINCT was making the SQL slower than 2 times. In cases like that I too try to find other ways and there are many ways you know:) ie:

index on timestamp tag dtctkiller unique
copy fields TimeStamp to myTempTable

Also try this SQL:
SELECT TimeStamp FROM bhav_data GROUP BY 1 into cursor Test

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform