Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the differance betwen these queries ?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
What is the differance betwen these queries ?
Miscellaneous
Thread ID:
00709748
Message ID:
00709748
Views:
69
---------------------
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 ?
Next
Reply
Map
View

Click here to load this message in the networking platform