Subject | Re: [ib-support] temporary tables |
---|---|
Author | Frank Ingermann |
Post date | 2002-04-16T18:32:21Z |
Hi Duilio,
Duilio Foschi wrote:
complex things into smaller parts, as you can e.g. use nested FOR SELECT
loops when there are lots of joins involved.
a *single* table and fill it temporarily, but it is imho not a good idea
to constantly modify the metadata of your db as a normal app behaviour.
In this single table you can take the generator and use it as a part of
the primary key, so each user will have the "impression" it's his/her own
temp table, while they are all really working on the same one. But you
should really try the storedproc as it may elminiate the need for temp
tables altogether.
fingerman
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?
fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de
Duilio Foschi wrote:
> I have to issue a special query.have you considered using a storedproc? it helps a lot in breaking up
>
> The query is so complex that I cannot guess how to do it in one step.
>
> So I have decided to create a temporary table, fill it in several steps,
> then open and go thru it.
complex things into smaller parts, as you can e.g. use nested FOR SELECT
loops when there are lots of joins involved.
> As several users could be working on the same query, I build the name ofyes indeed - don't use temporary tables like this at all! You could use
> the temporary table by adding a suffix and a number given by a generator.
> In this way I can be sure that the table name will be unique for every user.
>
> Are there better ways of using temporary tables in FB ?
a *single* table and fill it temporarily, but it is imho not a good idea
to constantly modify the metadata of your db as a normal app behaviour.
In this single table you can take the generator and use it as a part of
the primary key, so each user will have the "impression" it's his/her own
temp table, while they are all really working on the same one. But you
should really try the storedproc as it may elminiate the need for temp
tables altogether.
> TIAregards & hth,
>
> Duilio Foschi
fingerman
-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?
fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de