Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to improve this query
Message
 
 
To
13/05/2021 12:35:56
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01680377
Message ID:
01680385
Views:
32
>>Hi,
>>
>>When one of the features of the application is called (VFP form is opened), my application loads ALL records from the SQL Server DB. This is a spare parts table. Let's put aside that - maybe - I need to change the logic and get only those records the user needs.
>>Right now, one of the customers has about 25000 record in this table. They timed that it takes from 30 to 40 seconds to load them into the application window. Is it reasonable (I know it is subjective), but in general?
>>
>>I use the code
>>
>>select * from MyTable
>>
>>when pulling all records.
>>
>>How can I improve the above SQL Select?
>>
>>TIA
>>
>>UPDATE. The customer just sent me an email and wrote that sometimes pulling the records takes as little as 3 seconds. Just like right now.
>>
>>UPDATE 2. Actually I found that the query is not "select * ..." but listing all fields/columns of the table. So, the query is:
>>
>>select field1, field2... and so on from MyTable
>>
>>
>>I probably need to change this to "select * "
>
>
>There is nothing to improve on the query.
>You need to think on how to avoid having to download the whole table and only get those when you need them.

I "spoiled" customers with giving them all they want/need. You know it is hard to take it away when they are used to have it. About the problem, above. This customer is part of 5 plants, each one in a different region of the country. Each plant has a their own SQL database. And only one plant has the problem with data delays; intermittent, I should emphasize.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform