Subject Re[2]: [firebird-support] Re: Using VIEW (or not)
Author Nando Dessena
Riho-Rene,
just a guess...

RRE> 1. (9sec) select * from v_stat_history

this includes fetching all rows and sorting time.

RRE> 2. (20 ms) SELECT accid,account.OLDACCOUNT ,
RRE> SDATE, ROW , OPTYPE, NAME ,UNAME,
RRE> DOCNO, CD , AMOUNT, stat_history.CURRENCY,
RRE> BANKREF , DETAILS , CREF ,
RRE> stat_history.REGNO, LOCALAMOUNT,
RRE> stat_history.BANK , BACCOUNT
RRE> from stat_history join account on stat_history.accID=account.id
RRE> where account.ibandate>SDATE

this does not include fetching all rows and sorting time since no sorting is performed.

I'd guess if you take client fetch time into account (i. e. the time it
takes to fetch all results to the client), you're gonna see total time
is similar in both cases.

Ciao
--
Nando mailto:nandod@...