Subject Re: Reading unnecessary records
Author Dmitry Yemanov
04.04.2014 21:07, Leyne, Sean wrote:
>
> But you are assuming that because the PLAN shows that a non-referenced table is actually being read during execution. That may not be the case.

Firebird does not eliminate unreferenced tables from retrieval, so he's
correct. There's no difference in this regard between v1.x and v2.x though.

> The real test to confirm is running the queries and looking at the total of READs and FETCHes.

Checking page level statistics is a waste of time in this case. The
engine perfectly reports record level statistics on a per table basis,
this is a much better proof.

> Views are no slower than the same as standalone SQL, this has been tested/benchmarked and confirmed.

View is no slower than its replacement as a derived table, but it can be
slower than logically the same but streamlined query.


Dmitry