Q:Setting order in a local view

Q:Setting order in a local view

Post by Levent Seze » Tue, 27 Jan 1998 04:00:00



Is there a way to change the order of the records in a local view
without destroying and re-creating the view in the database (VFP 5.0a)?
I don't want to create indexes each time I open the view since that will
take a long time as the number of records in the view increase. As far
as I know, the parameters in the view can only be used in the WHERE
clause. Any suggestions?

Thanks,
Levent

 
 
 

Q:Setting order in a local view

Post by Anders Altber » Thu, 29 Jan 1998 04:00:00


Give each user a copy of the database or a temp database and let them create
views on the fly.
Indexing a view with 1000 rows takes less than 0.5 second. Ordering a view
in an ORDER BY clause takes some time too. The net difference isn't much.
Indexing is probably faster the REQUERYing with a new ORDER BY.

-Anders


>Is there a way to change the order of the records in a local view
>without destroying and re-creating the view in the database (VFP 5.0a)?
>I don't want to create indexes each time I open the view since that will
>take a long time as the number of records in the view increase. As far
>as I know, the parameters in the view can only be used in the WHERE
>clause. Any suggestions?

>Thanks,
>Levent



 
 
 

Q:Setting order in a local view

Post by Trey Walpol » Thu, 29 Jan 1998 04:00:00


We have indexes on our views that we don't create until the user wants to
sort (e.g., by double clicking a grid header)
It takes a split second longer to create the index than change the SET
ORDER TO an index that's already created and the records stay in the index
order, whereas the ORDER BY clause only orders when the SELECT fires.

Either is faster than requerying the view...

I would recommend going ahead and indexing them.

--
Trey Walpole

-- For legit e-mail, remove underscores



> Is there a way to change the order of the records in a local view
> without destroying and re-creating the view in the database (VFP 5.0a)?
> I don't want to create indexes each time I open the view since that will
> take a long time as the number of records in the view increase. As far
> as I know, the parameters in the view can only be used in the WHERE
> clause. Any suggestions?

> Thanks,
> Levent