Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call SQL index
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00511384
Message ID:
00512105
Views:
11
Hi!

Well, I'm still thinking that it is bad idea to download more than 1000 records from the server, what say about 10,000+? ;)

Usual interface of the application for SQL Server that works with a large data sets is developed to do not download such amount of data. Instead of that, there is a search page or screen where user inputs the criteria for records selecting. Than I use query like following:

SET ROWCOUNT 1001
SELECT ....
SET ROWCOUNT 0

and run it using SQL EXEC. Or just set setting using SQLEXEC, requery view, than set it back using SQLEXEC.

I warn user each time when 1001 record returned (more than 1000), so user can change criteria to make it more narrow.

Than I use only that recordset for navigation (move throug records). Really, navigation through records by next/previous record movement for such large record set makes no any sense for users. They're much more comfortable when working with subsets of little number of records.

If you still want to organize that... Well, you can download all fields required for navigation (ID) and indexes (whatever fields that you use for indexes). Than, in process user navigates through records, query a single record in another view that contains all other data. This way you will reduce the amount of data transferred by the main view.

Also, I did never worked with partially loaded views, so I don't know if following will work, but I guess it worth a try:

USE MyView in 0 NODATA
SELECT MyView
INDEX ON ...
INDEX ON ... ADDITIVE
...
REQUERY()

You can open view without data, index it than query it. All indexes will be used in such case, however, requery() of view is somewhat slower. And I don't know if requery() for such view downloads all records.

HTH.

>Hi,
>
>Thanks for your response and suggestion on my problem.
>I have a question that I wish you can give your opinion.
>You said that I can use Index command on the views.
>That's true, but I found all records will pass to my
>workstation when I index the table. If there are more
>than 10000 records, this will increase the network traffic
>and is time consuming. Thus may be impossible for large
>tables. Isn't it ?
>Actually I just want to use the records movement feature.
>That is push buttons.
>Have you any idea on this?
>
>Thanks,
>Samuel
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform