Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Slow Browse on 1.5 mil table & slow query.
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00344424
Message ID:
00344455
Views:
20
>I have a table with 1.5 mil records. When I browse or query it is slow. I have an index on every field I query on. I already ran sys(3054,11) and I am fully optimized. Help!!!!

One comment -- Too many indexes can actually slow you down. This could be part of your slow open. Better to index the most frequently queried on fields only.

Remember -- a partially optimized query will run almost as fast a fully optimized one if the partially opimized field alone is enough to reduce your result set to something reasonable. In other words if you are querying by last name and date, and only last name is indexed but you are search for "mehagahigle" and you only have a few hundred "mehagahigles" in the database, your query shold still execute in seconds.

If you have enough indexs to make sure that 90%+ of your queries are partially optimized you have enough indexes. Eliminate all beyond this need and you will see a speed improvement (though not neccesarily all you need).

More questions:

Is the table on a server/station separate from the one on which it is being opened?

What is the amount of Ram/ Processor/ disk controller/ Disk type on the station where you are executing the "Use" and other commands.


If the table is on a different workstation or server, what is the answer to above questions for the workstation or server. And (again assuming this is a separate machine) what is the server/stations OS. What is the speed of the connection.

I'd need the answer to these questions to know for sure -- but when you work with large tables you have to throw hardware at them.

You should have at 512 meg of Ram on the client machine (a gig would be better).

If you are pulling this from a server or if the file is on a shared drive, them machine which it is on should again have at least 512 meg 1 gig of memory would be better.

If this table is being opened from machines other than the one on which it resides, you should have at least 100MPS of network speed, 100 Base-T ethernet for example or high speed Token ring.

Another point-- you might get some results by playing with the sys(3050) function. Use help to find out how this works. Default VFP settings are almost never optimal and are usually too high. You'll have to play with it to find out how and if this applies in your case. If your hardware is below what I've suggested, this will probably give you some improvement, almost certainly not as much as you need.

Hope this helps.
Thanks

Gar W. Lipow
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform