Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query Not Optimized
Message
From
18/11/2011 15:41:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Query Not Optimized
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01529257
Message ID:
01529257
Views:
94
I have a table INVTMFHD with separate index tags on (among others) fields PARTMFGR and MFGR_PT_NO. If I do....
lcMfgr = "somevalue"
lcPtNo = "some value"

SELECT * FROM invtmfhd WHERE partmfgr = lcMfgr
-----> Using index tag Partmfgr to rushmore optimize table invtmfhd

SELECT * FROM invtmfhd WHERE mfgr_pt_no = lcPtNo
-----> Using index tag Mfgr_pt_no to rushmore optiomize table invtmfhd

SELECT * FROM invtmfhd WHERE mfgr_pt_no = lcPtNo AND partmfgr = lcMfgr
----->Using index tag Mfgr_pt_no to rushmore optimize table invtmfhd
----->Using index tag Partmfgr rushmore optimize table invtmfhd
But if I try to JOIN I get
SELECT invtmfhd.uniqmfgrhd,crsTemp1.partmfgr,crsTemp1.mfgr_pt_no ;
  FROM invtmfhd;
    JOIN crsTemp1 ON invtmfhd.partmfgr = crsTemp1.partmfgr;
                          AND invtmfhd.mfgr_pt_no=crsTemp1.mfgr_pt_no;
  INTO CURSOR crsTemp2

-----> Rushmore optimization level for table invtmfhd: none
-----> Rushmore optimization level for intermediate result: none
Can somebody please educate me on why the tags don't get referenced and how I might be able optimize the query?

Thanks to all..........Rich
Next
Reply
Map
View

Click here to load this message in the networking platform