Subject | Re: [firebird-support] Re: Why the difference? |
---|---|
Author | W O |
Post date | 2013-03-01T14:02:53Z |
Hello Mark
EXCELLENT!!!
That was the solution!!!
Removing the ORDER BY clause of the view's definition it takes now just
0.966 seconds (less then 1 second!!!!!!!)
So, I shall remember (and hope never forget it):
NEVER TO USE AN ORDER BY CLAUSE IN A VIEW!!!!!!!!!
Thank you very much!!!
Greetings.
Walter.
EXCELLENT!!!
That was the solution!!!
Removing the ORDER BY clause of the view's definition it takes now just
0.966 seconds (less then 1 second!!!!!!!)
So, I shall remember (and hope never forget it):
NEVER TO USE AN ORDER BY CLAUSE IN A VIEW!!!!!!!!!
Thank you very much!!!
Greetings.
Walter.
On Fri, Mar 1, 2013 at 9:31 AM, Mark Rotteveel <mark@...> wrote:
> **
>
>
> On Fri, 1 Mar 2013 09:29:55 -0400, W O sistemas2000profesional@...>
> wrote:
>
> > The view V_ABM_PERSONAS is:
> >
> > CREATE VIEW V_ABM_PERSONAS(
> > PER_IDENTI,
> ...
> > FROM
> > PERSONAS P
> ...
>
> > ORDER BY
> > P.PER_CEDULA;
> >
> > There is an index on the column PER_CEDULA and all the tables are using
> its
> > Primary Key or an Unique Key.
> >
> > CREATE INDEX IDX_PERSONAS1 ON PERSONAS(PER_CEDULA);
>
> What happens when you remove the ORDER BY from the view definition? In
> general I'd advise against specifying ORDER BY in a view.
>
> Mark
>
>
>
[Non-text portions of this message have been removed]