Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the differance betwen these queries ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
What is the differance betwen these queries ?
Divers
Thread ID:
00709748
Message ID:
00709748
Vues:
70
---------------------
1. QUERY
---------------------
select * ;
  from AtpNet!mhsb, ;
       AtpNet!hplan ,;
       atpnet!kimlik ;
 where mhsb.hplan   = hplan.id ;
   and mhsb.kimlik = kimlik.id ;
   and hplan.exp like 'Reklam%'

Query Result : 
	Selected 126 records in 1.26 seconds

result of SYS(3054 12, "cMemvar") is :
	Rushmore optimization level for table mhsb: none
	Using index tag Exp to rushmore optimize table hplan
	Rushmore optimization level for table hplan: partial
	Rushmore optimization level for table kimlik: none
	! Joining table hplan and table mhsb using index tag Hplan
	! Joining intermediate result and table kimlik using index tag Id

---------------------
2. QUERY
---------------------
select mhsb.id ;
  from atpNet!mhsb, ;
       atpNet!hplan ,;
       atpnet!kimlik ;
 where mhsb.hplan  = hplan.id ;
   and mhsb.kimlik = kimlik.id ;
   and hplan.exp like 'Reklam%'

Query Result : 
	Selected 126 records in 0.01 seconds

result of SYS(3054 12, "cMemvar") is :
	Rushmore optimization level for table mhsb: none
	Using index tag Exp to rushmore optimize table hplan
	Rushmore optimization level for table hplan: partial
	Rushmore optimization level for table kimlik: none
	! Joining table kimlik and table mhsb using index tag Kimlik
	! Joining table hplan and intermediate result using temp index


Note 1: recods of table :  mhsb: 131.171; kimlik: 18.104 ; hplan:5
     2: Each table has primary index on tag "id" and in addition to hplan has a index on tag "exp"

My Questions
-------------
1. 1.query is slower than 2.query. Why ?
2. Rushmore optimization of second query is executed wrongly. Why ?
3. How can I solve rushmore optimization problem ?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform