Subject Re: [firebird-support] Creating INDEXes on a VIEW
Author Martijn Tonies
Brian,

> > > 1) use an ORDER BY clause in the view definition, and
> > > 2) define a new view for each different way of collating
> > > the information required by the view?
> >
> > Although valid, I would not include include an ORDER BY in a VIEW
> > definition.
>
> We would need to be able to use some form of indexing on the result set
(be

Indexing on the resultset? Aren't you confusing Paradox/dBase with
result-sets?

If you want an ordered resultset from a C/S system, use the SQL ORDER
BY clause. An index - by the database engine - is used for looking up
rows to be returned for a resultset, not for ordering.

> it an ORDER BY in the view definition or indexing the underlying tables)
in
> order to retrieve data indexed in a certain way.

I think you mean "to retrieve data ordered in a certain way", right?

> Why would you not include an ORDER BY in a VIEW definition?

You can't ORDER BY in a VIEW definition.


With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com