Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why the difference?
Message
 
 
To
26/06/2001 15:16:26
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00523778
Message ID:
00523789
Views:
12
I do not understand why you would need to create this view every time you start the app. Are you creating a user DBC on the local drive for all our views? And using a shared DBC on the server? Once you create the view, you should not need to recreate every time, and you would then eliminate any need to bpack the DBC. IMHO, this is all bad practice to do under runtime.

>I finally give up. I have an application that, when it starts up, creates an sql view, and it opens the view reeeeaaal slow.
>
>It's a simple view - "Create Sql View v_contracts as select * from ctracts". I don't see how it could be any simpler. The data lives on the network. Also I should mention that I pack the database before exiting the application, so that when it starts up again, there are no deleted records in the database itself.
>
>If, from the command window, I type,
>
>
>Set safety off
>open database contracts
>set database to contracts
>create sql view v_contracts as select * from ctracts
>set safety on
>use v_contracts nodata
>requery('v_contracts')
>
>
>that last requery line pulls down the 10,000 records in .44 seconds.
>
>Now, if I create a completely empty form, and put those very same lines in the beforeopentables() event of the datasession, compile it into an exe and run it, that last requery line pulls the same 10,000 records down in 8.99 seconds.
>
>The code in the actual application has more to it, but for the purpose of testing, I did the above and kept it as simple as I could.
>
>Can anybody give me a clue what I should be looking for as to why an exe might take so much longer than the command window to get the same records from the same table on the same network using the same code?
>
>Alan
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform