Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Performance issues when querying shared data
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
01057091
Message ID:
01057110
Views:
12
Mathias

I'm not claiming to be any expert on client/server, and I didn't check on the category of your question before replying. I was referring mainly to VFP SQL syntax but I don't follow your assertion. Check the syntax below where you can see that inner & outer jouns etc. ARE used in querying tables - not for permanently joining them.

For instance:
Select F1 from X, Y ;
  where X.F2 = Y.F2
compared with
Select F1 from X ;
  Inner join Y on X.F2 = Y.F2
SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] [Alias.] Select_Item 
   [[AS] Column_Name] [, [Alias.] Select_Item [[AS] Column_Name] ...] 
   FROM [FORCE][DatabaseName!]Table [[AS] Local_Alias] 

   [[INNER | LEFT [OUTER] | RIGHT [OUTER] | FULL [OUTER] JOIN 
      DatabaseName!] Table [[AS] Local_Alias] [ON JoinCondition …]
      [[INTO Destination] | [TO FILE FileName [ADDITIVE] | TO PRINTER 
      [PROMPT] | TO SCREEN]] [PREFERENCE PreferenceName]
      [NOCONSOLE] [PLAIN] [NOWAIT]

   [WHERE JoinCondition [AND JoinCondition ...]
      [AND | OR FilterCondition [AND | OR FilterCondition ...]]]
   [GROUP BY GroupColumn [, GroupColumn ...]] 
   [HAVING FilterCondition] [UNION [ALL] SELECTCommand] 
   [ORDER BY Order_Item [ASC | DESC] [, Order_Item [ASC | DESC] ...]]
You asked for ideas!

Terry

>Thanks Terry
>
>The where clause is purely for selection criteria. Not joining tables.
>
>
>>Mathias
>>
>>Sounds reasonable. I would recommend that where poss. you use the join conditions in your SQL (e.g. "inner join OtherTable on ...", rather than "where ...". It can speed up your queries by an order of magnitude.
>>
>>HTH
>>
>>Terry
>>
>>>Hi All,
>>>
>>>I have had reports and a colleague has confirmed that a query takes significantly longer if the table being queried is open shared so:
>>>
>>>Select a.* from Customer a Into Cursor curCustomer where ??? && takes 2 seconds when I am the only user in the system
>>>
>>>The same query takes 5 seconds if the table customer is open by another user.
>>>
>>>No views involved
>>>
>>>Any ideas please?
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Reply
Map
View

Click here to load this message in the networking platform