Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query has very basic structure for rushmore
Message
De
07/07/2005 11:53:52
 
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 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01029945
Message ID:
01029996
Vues:
9
>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

I guess thet This is correlate with VFP joins order:
select * ;
  from force hurun ;
    join   abone ON abone.hurun  = hurun.id ;
    join   ekler ON ekler.id = abone.ekler ;
 where  hurun.exp like "Aksi%"

* if previous it is slow post this result
select COUNT(*) ;
  from force hurun ;
    join   abone ON abone.hurun  = hurun.id ;
 where  hurun.exp like "Aksi%"

* then try this :
select * ;
  from force ekler ;
    join   abone ON abone.ekler = ekler.id  ;
    join hurun ON hurun.id = abone.hurun 
 where  hurun.exp like "Aksi%"
Post SYS(3054,11).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform