Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another what's faster question!!!
Message
From
11/10/2002 09:57:00
 
 
To
11/10/2002 09:35:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00710254
Message ID:
00710289
Views:
10
Sunshine,

It is especially important that you mention the version when it is not VFP.

I don't remember FPD well enough to tll you how to check the TAG definitions. Maybe a DISPLAY STRUCTURE will do it.

Looking at your SQL. . .

a) Is there an index on "rca"? If not, make one.
b) Is the data in the "rca" field forced to be upper-case on entry OR does the index TAG expression include an UPPER function?
c) I doubt that you have an index TAG codes like "left(codes,1)". As long as you have SET ANSI OFF you should be OK coding just codes = "1" and you also should have an index on "codes".

With only 26,000 records these things should give you sub-second response.

By the way, you will want to use a PADR around your expression "alltrim(city) + ' ' + alltrim(zip)" to ensure that the length of the returned value is always as long as you need. So if you need that to always show AT LEAST 20 characters the you should code it as:
PADR(alltrim(city) + ' ' + alltrim(zip),20," ")

good luck



>1) what version of VFP?
>Running 2.6 for DOS
>
>2) What OS?
>Win 98
>
>3) What RAM on the machine running so slow?
>Virtually no RAM on my computer left (waiting on a new one hopefully).
>The person who runs this program daily has a new DELL with 256.
>
>4) Can you show us the Select statements that are running so slow?
>
>select name as name, address as address, alltrim(city) + ' ' + alltrim(zip) as city;
>from rchld;
>where (rca = 'ATL' .or. rca = 'NAT');
> .and. exp_date >= date();
> .and. left(codes,1) = '1';
>into table temp;
>order by name
>
>The other selects select codes = 2 and then codes = 3.
>
>This table has 4 indexs and I'm not sure how to tell if one indexes the name field. How can I tell what an index indexes?
>
>Thanks,
>Sunshine
Previous
Reply
Map
View

Click here to load this message in the networking platform