Subject Re: [firebird-support] Empty table optimization
Author masotti
Hi,

On 05/10/2010 11:50, tomjanczkadao wrote:

> My original case is more complicated. For each result of main FOR SELECT
> loop i do few inserts, do some calculations on inserted values and
> finally delete all records used for calculations. And that final delete
> seems to be weakest link. I see no way to use index like test example above.


if IIRC TEMPORARY TABLES are stored in memory, so you can make temporary
computation on a temporary table.
Because TT are can be cleaned on commiit, you need to delete at the end
of each FOR SELECT cycle, but writes are not performed to/from disk.
Expecially if your db has forced writes this can give a performance boost.

Ciao.
Mimmo.