121040Re: [firebird-support] Re: Why the difference?
- Mar 1, 2013Hello Mark
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!!!
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@...>
> > 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
> > 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.
[Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>