Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query has very basic structure for rushmore
Message
From
07/07/2005 11:09:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01029945
Message ID:
01029963
Views:
14
>My problem
>
>I have two equal in every respect query. But querys speed are very different.
>I have looked at fox.wiki, ut thread and other sources to solve this problem.
>
>I know that, rushmore optimization technique cannot optimize the query for some situation.
>But my query has very basic structure that is easily parsed by rushmore
>
>
>Main Table
>-----------
>Abone : 715.317 records (Abone table has index on ekler and hurun fields)
>
>
>Child Tables
>-----------------------
>Hurun : 20 records (Hurun table has index on id field)
>Ekler : 16 records (Ekler table has index on id field)
>
>
>All the fields (abone.hurun, abone.ekler, ekler.id and hurun.id) are int type and indexed
>Index collate ise turkish and alt tables has türkish code page. && cpdbf("abone") returns 1254
>
>
>--------------------------
> First query
>--------------------------
>
>select * ;
>  from abone, ;
>       hurun, ;
>       ekler ;
> where abone.hurun  = hurun.id ;
>   and abone.ekler  = ekler.id ;
>   and hurun.exp like "Aksi%"
>
>
>Result : selected 309 records in 6.48 seconds
>
>
>---------------------------
> Second query
>---------------------------
>
>
>
>select * ;
>  from abone, ;
>       hurun, ;
>       ekler ;
> where abone.hurun  = hurun.id ;
>   and abone.ekler  = ekler.id ;
>   and ekler.exp like "Arkd%"
>
>
>
>Result : Selected 1155 records in 0.03 seconds

Ali,
Woudl you try like this:
set ansi off && default
select * ;
  from abone  ;
  inner join hurun on abone.hurun  = hurun.id ;
  inner join ekler on abone.ekler  = ekler.id ;
 where ekler.exp = "Arkd"
Is there a reason you're using Turkish collate. I suggest to use Machine.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform