Subject Re: [firebird-support] Boolean expression and query execution plan
Author Lele Gaifax
Ivan Prenosil wrote:
> FOR SELECT what
> FROM testbes tb
> WHERE id BETWEEN :id_min AND :id_max
> AND dat BETWEEN :dat_min AND :dat_max
> INTO what DO
> SUSPEND;

Thank you Ivan, this seems a reasonable and effective workaround, the
readability of the query benefits too.

> (Better avoid that method for huge tables, but around million rows
> you should still be o.k.)

OOC, what would be the problem? I assume you mean if the query *selects*
million rows... I have a few tables that are approaching that number of
records, but of course in normal cases the procedure above
operates/returns only a fraction of those. Anyway, you seem to imply
that there are other methods...

Thank you again,
bye, lele.