Subject | RE: [firebird-support] Do global temporary tables have performance advantages over usual tables |
---|---|
Author | Maya Opperman |
Post date | 2013-08-07T05:56:41Z |
> The question is - do global temporary tables have performanceI'm not sure if querying a regular table is faster or not, but I use temp tables for speeding up complicated queries that need to use the same result of a complex calculation several times over. So they can help speed in that sense. Using a real table is not an option for me, as I discard the information once the query is done, so I use the handy auto-delete on commit option. I only want the information visible to the query I am busty running, and then never again.
> advantages over usual tables?
It also has the benefit that I can update the temp table, even if I am working in a read-only transaction.
So, I am using it to improve speed, but whether working with them is optimised for speed I'm not sure. I they would always be in memory, so that would be a speed benefit.
I suppose you need to look at all the functionality you need, before deciding which option to go for.