Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>>>>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?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement