Re: Any way to speed up this query?
From: Rick Bean (rgbean_at_unrealmelange-inc.com)
Date: Tue, 5 Oct 2004 18:42:32 -0400
In that case, you might want to simply copy Table 1 into a separate fileusing the standard copy commands (this should be fast). Then just alter the table to add the three fields and use xBase code to fill in the extra related data (SCAN using a SET RELATION or SEEK and then a REPLACE). In VFP 9.0 you could use the new correlated UPDATE SET command, but probably not just yet! <g>
"Kathy Weise" <email@example.com> wrote in message news:4OE8d.3713$M05.firstname.lastname@example.org...
> I'm creating a file to output to a client. Table1 is their pristine data. I
> append some data to a working copy of their file (table2) in which I've
> parsed fields, address standardized, etc. At the end, they want just their
> pristine data back with 3 appended fields. Yes, it's 1 to 1 so the new table
> is only bigger than the original by the three added fields.
> "Rick Bean" <email@example.com> wrote in message
> I'm just curious why you need this table. Are you moving the data to another
> system, or are you just using it for a query or report? If you just want to
> "browse" or report on the resulting rows, then just using both tables with a
> relationship should suffice. (I am assuming that this is a 1-1 relationship
> otherwise you might be pushing the 2gb max table size for the resultant
> "Kathy Weise" <firstname.lastname@example.org> wrote in message
>>I have a query that looks sort of like this:
>> Select table1.name, table1.address, table,1.city, table1.state,;
>> [and several more fields from table1], table2.a, table2.b, table2.c;
>> from table1, table2 where table1.seqno = table2.seqno;
>> into table3
>> I have seqno indexed on both tables (both numerical and both 10
>> Each table is close to1 Gb. The query takes 2 hours (if I haven't just
>> defragged my HD which helps a little).
>> Is there anyway to speed this up?