Mike,
If you have lots of duplicate provnum fields in cClaimstable then have you 
tried "select distinct" in both the selects. This should be quicker (I think), 
especially in the 2.5m row table.

Dave




---------------------------------------------------------------
This communication and the information it contains is intended for the person 
or organisation to whom it is addressed. Its contents are confidential and may 
be protected in law. If you have received this e-mail in error you must not 
copy, distribute or take any action in reliance on it. Unauthorised use, 
copying or disclosure of any of it may be unlawful. If you have received this 
message in error, please notify us immediately by telephone or email.

Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the 
risk of virus transmission through email and therefore any files sent via 
e-mail will have been checked for known viruses. However, you are advised to 
run your own virus check before opening any
attachments received as Flexipol Packaging Ltd will not in any event accept any 
liability whatsoever once an e-mail and/or any attachment is received.

It is the responsibility of the recipient to ensure that they have adequate 
virus protection.

Flexipol Packaging Ltd.
Unit 14 Bentwood Road
Carrs
Industrial Estate
Haslingden
Rossendale
Lancashire
BB4 5HH

Tel:01706-222792
Fax: 01706-224683
www.Flexipol.co.uk
---------------------------------------------------------------

Terms & Conditions:

Notwithstanding delivery and the passing of risk in the goods, the property in 
the goods shall not pass to the buyer until the seller
Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds 
payment in full of the price of the goods and all other goods agreed to be sold 
by the seller to the buyer for which payment is then due. Until such time as 
the property in the goods passes to the buyer, the buyer shall hold the goods 
as the seller's fiduciary agent and bailee and keep the goods separate from 
those of the buyer and third parties and properly stored protected and insured 
and identified as the seller's property but shall be entitled to resell or use 
the goods in the ordinary course of its business. Until such time as the 
property in the goods passes to the buyer the seller shall be entitled at any 
time

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
MB Software Solutions General Account
Sent: 16 August 2012 15:29
To: [email protected]
Subject: Query taking 4 minutes...ugh

VFP9SP2 - WinXP - dbfs on network

I have to query 2 tables to populate a lookup list:

SELECT x1.provnum ;
FROM (ADDBS(this.cDataPath)+this.cClaimsTable) x1 ; UNION ; SELECT x2.provnum ; 
FROM (ADDBS(this.cDataPath)+this.cDischargeTable) x2 ; INTO CURSOR curTemp

This query is taking forever (4 minutes!).  There's no WHERE clause so it's not 
optimizable.  But is there a better way?

My current plan now is to create logic that extracts the provnums into a 
separate table and just query that.  That makes complete sense to me.
(These tables are basically input files from a vendor, with the provnum built 
in and not sent in a separate lookup table.)

Other ideas?

tia,
--Mike



[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to