Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: "David Frankenbach" <sendnospam@xxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 09:23:39 -0500
David,
You might also try:
store "slavefile.ssn = eog04all.ssn and left( slavefile.lname, 4 ) = left(
eog04all.lname, 4 ) and left( slavefile.fname, 4 ) = left( eog04all.fname,
4 )"
with indexes on each table:
index on ssn tag ssn
index on left( lname, 4 ) tag lname4
index on left( fname, 4 ) tag fname4
--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro
"David" <David.Aman@xxxxxxxxx> wrote in message
news:1113785808.284748.31280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thanks for the reply. I've included the SQL statement below.
> ---
> A couple of notes:
> ---
> The &cSimsEogMatch comes from this:
> ============================
> STORE 'ALLTRIM(slavefile.ssn) + LEFT(slavefile.lname,4) +
> LEFT(slavefile.fname,4) = ;
> ALLTRIM(eog04all.ssn) + LEFT(eog04all.lname,4) +
> LEFT(eog04all.fname,4)' ;
> TO cSimsEogMatch
> ---
> The cNctDate comes from this:
> ============================
> STORE 'Mon 7 2005' TO cNctDate
> ---
> Finally, I've also tried replacing the " INLIST(simsgrade,'.....') "
> with a WHERE...IN... for VFP9, but it did not seem to help.
> ---
> OK, here we go...
> ---
> ---
> SELECT cNctDate as simsnctdt, ;
> slavefile.sch as simssch, ;
> slavefile.gr as simsgrade, ;
> slavefile.lname as simslname, ;
> slavefile.fname as simsfname, ;
> slavefile.ssn as simsssn, ;
> slavefile.daysmem as simsmem, ;
> slavefile.rdpre as simsread, ;
> slavefile.rdprereas as simsreadmr, ;
> slavefile.rdpredate as simsreaddt, ;
> slavefile.mtpre as simsmath, ;
> slavefile.mtprereas as simsmathmr, ;
> slavefile.mtpredate as simsmathdt, ;
> eog04all.lname as eoglname, ;
> eog04all.fname as eogfname, ;
> eog04all.testform as eoggrade, ;
> eog04all.leacode as eogsch, ;
> eog04all.ssn as eogssn, ;
> eog04all.eth as eogeth, ;
> eog04all.sex as eogsex, ;
> eog04all.lep as eoglep, ;
> eog04all.exc as eogec, ;
> eog04all.byr + eog04all.bmon + eog04all.bday as eogdob, ;
> eog04all.readscale as eogread, ;
> eog04all.readlev as eogreadlev, ;
> eog04all.mathscale as eogmath, ;
> eog04all.mathlev as eogmathlev, ;
> eog04all.absread as eogreadab, ;
> eog04all.absmath_a as eogmathaba, ;
> eog04all.absmath_i as eogmathabi, ;
> eog04all.aaairead as eogreadalt, ;
> eog04all.aaaimath as eogmathalt, ;
> eog04all.aap as eogaap, ;
> eog04all.transfer as eogtrans ;
> FROM slavefile LEFT OUTER JOIN eog04all ;
> ON &cSimsEogMatch ;
> WHERE slavefile.gr IN ('04','05','06','07','08') ;
> INTO CURSOR cur_SimsEogMatch
>
.
- Follow-Ups:
- References:
- SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: David
- Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: David
- Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: Sergey Berezniker
- Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: David
- Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: David Frankenbach
- Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- From: David
- SQL Select: Very Fast in VFP8, Very Slow in VFP9
- Prev by Date: Re: "Append From" problem
- Next by Date: Re: "Append From" problem
- Previous by thread: Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- Next by thread: Re: SQL Select: Very Fast in VFP8, Very Slow in VFP9
- Index(es):