Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Right Outer Join and Rushmore Optimization Issue
Message
From
21/10/2003 17:08:43
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Right Outer Join and Rushmore Optimization Issue
Miscellaneous
Thread ID:
00840847
Message ID:
00840847
Views:
36
Hi All,

I really need some help understanding why our RIGHT OUTER JOIN is not
Rushmore optimized. It is way slow. Although a different result set,
removing the RIGHT OUTER JOIN yields almost instantaneous response.

As best as I understand Rushmore optimization, the required tags
certainly exist. We have read and re-read help topics on Rushmore
optimization.

Last night at the Portland, Oregon VFP SIG several others looked
at this issue with me and were also puzzled.

I am desperate for help. Would someone kindly help me understand
the issue(s) here?

Thank you!
(ParentKey is the "Addr" foreign key that matches up to altProv.DetailKey. 
According to SYS(3054,11) there is no optimization on "Addr". )

SELECT      altProv.DetailKey  ;
        ,   altProv.LastName   ;
        ,   Addr.DetailKey     ;
        ,   Addr.ParentKey     ;
    FROM    "AltProv"          ;
    RIGHT OUTER JOIN "Addr"  ;
            ON ( altProv.DetailKey == Addr.ParentKey ) ;
    WHERE   ( altProv.DetailKey == "00938694" ) ;
    INTO CURSOR	"TestOnly"
-------------
More details:
-------------
The tables are on the network server (100 MB ethernet)
The query takes about 2.1 seconds to run.
My machine is a Compaq 2.4 Ghz with XP Pro (SP1) and 512 MB memory.
The .CDX's have been created from scratch
Queries in both 7.0 and 8.0 take about the same amount of time.
SET ANSI is ON
SET COLLATE is MACHINE
SET OPTIMIZE is ON

---------------------
SYS(3054,11) Results:
---------------------
VFP 7 says AltProv's optimization is "full", VFP 8 says AltProv's optimization is "partial"
7.0 SP1 and SYS(3054,11):
  Using index tag Detailkey to rushmore optimize table altprov
  Rushmore optimization level for table altprov: full
  Rushmore optimization level for table addr: none
  Joining table addr and table altprov using index tag Detailkey
8.0 SP1 and SYS(3054,11):
  Using index tag Detailkey to rushmore optimize table altprov
  Rushmore optimization level for table altprov: partial
  Rushmore optimization level for table addr: none
  Joining table addr and table altprov using index tag Detailkey
-----------------------
Tables (free) and tags:
-----------------------
All fields type character, date or datetime:
  Alias: ALTPROV    Code page:   1252
  Field  Field Name      Type         Width
      1  DETAILKEY       Character        8
      ...
      ...
      ...
     19  CREATEDON       DateTime         8
  ** Total **                           245
  Structural CDX file:   P:\FBDATA\ALTPROV.CDX
            Index tag:   DETAILKEY    Collate: Machine    Key: DETAILKEY Candidate

  Alias: ADDR      Code page:   1252
  Field  Field Name      Type         Width
      1  DETAILKEY       Character        8
      2  PARENTKEY       Character        8
      ...
      ...
      ...
     11  CREATEDON       DateTime         8
  ** Total **                           130
  Structural CDX file:   P:\FBDATA\ADDR.CDX
            Index tag:   PARENTKEY    Collate: Machine    Key: PARENTKEY
            Index tag:   DETAILKEY    Collate: Machine    Key: DETAILKEY Candidate
Next
Reply
Map
View

Click here to load this message in the networking platform