Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Speed problems - getting desperate
Message
From
01/03/1999 17:04:27
Larry Long
ProgRes (Programming Resources)
Georgia, United States
 
 
To
01/03/1999 15:13:01
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00192832
Message ID:
00192883
Views:
22
>>>In order to load my forms as quickly as possible, I am trying to use views instead of the actual tables. But the views don't seem to be loading quickly!
>>>
>>>I've marked all of my views as NoDataOnLoad in the DataEnvironment but they still take a long time to open. Why would the statement USE MyView NODATA take a long time to execute?
>>>
>>>Here is a sample view:
>>>
>>>SELECT Table1.LinkField,Table1.Field1,Table1.Field2, ;
>>> Table1.Field3, Table1.Field4, Table1.Field5 ;
>>>FROM Table1;
>>> INNER JOIN Table2 ;
>>> ON Table2.SeqNo=Table1.LinkField ;
>>> WHERE Table2.Id="123"
>>>
>>>According to the SYS(3054) function, everything is optimized. I have DELETED() tags on both files. I have tags on Table2.SeqNo and Table2.Id. Why should this SELECT seem to take forever? What can I do to speed it up? This is only one of several views I need to open and requery.
>>>
>>>Thanks!
>>>Elyse
>>
>>How many records you expect to get in the recordset? What is destination of this view? Grid?
>
>The base tables each have 372,000 records. The recordset of the view I was testing had about 45 records. In the form these records will end up in a grid, but I saw the problem with the speed just from the Command Window.
>
>Elyse
Try

SELECT Table1.*
FROM Table1;
INNER JOIN Table2 ;
ON Table2.SeqNo=Table1.LinkField ;
WHERE Table2.Id="123"

I believe that this could speed things up. By selecting all the fields from a table it may not have to create a temp file from scratch (more like a filter on an existing table). Let me know if this does, in fact, work better.
HTH
//:^)
L.A.Long
ProgRes
lalong1@charter.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform