General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>>>>Yes.
>>>>>Also you can create a index for a view.
>>>>
>>>>Can you create an index for a view from the View Designer?
>>>
>>>No. It has to be created once the view is USEd.
>>
>>Ah Ha! so I can do an INDEX ON ... in the form.init after loading the tables and views to create indexes...
>>
>>
>>Thanks
>
>Yep. And it cleans up after itself when the view is closed. Which means that as long as USED("v_view")=.T. then the index will persist, but if you ever close the view, you'll have to recreate the index.
>FWIW - you may not need this in this case, but if the view is table buffered, you can't create the index. You can set it to row buffering, create the index, then set table buffering back on e.g.
>** assuming we already know the view is table buffered
>SELECT v_view
>CURSORSETPROP("Buffering", 3)
>INDEX ON field TAG tag
>CURSORSETPROP("Buffering", 5)
Thanks for the info....
If I open the view in the DE can I assume that the view is always open if I don't close it in code or should I do a USED("v_view")=.T. before using the index?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only