Subject | Re: [Firebird-Architect] RFC: Proposal for the implementation of Temporary Tables. |
---|---|
Author | Ann W. Harrison |
Post date | 2004-11-23T21:33:02Z |
At 04:07 PM 11/23/2004, Adam Clarke wrote:
The create statement causes changes to the system tables but the
table isn't instantiated - or useable - until the transaction that
created it commits. And yes, if two transactions both attempt to
create temporary tables called "FOO", the second will stall then
get an error if the first commits.
insure that your table names are unique. The latter
has a serious problem in that it will eventually run
into the 32768 table definition limit.
connections. It allows a single connection to keep its temporary
data across its transactions.
Cheers,
Ann
>Will an attempt to create a temporary table with the same name as anCreating temporary tables is just like creating permanent tables.
>existing temporary table (from another uncommitted transaction) fail
>even it you use ON COMMIT DELETE?
The create statement causes changes to the system tables but the
table isn't instantiated - or useable - until the transaction that
created it commits. And yes, if two transactions both attempt to
create temporary tables called "FOO", the second will stall then
get an error if the first commits.
>I would hope not because thisActually, you have to plan ahead or use a mechanism to
>simplifies the use of temporary tables, otherwise you must manage
>conflicts yourself somehow.
insure that your table names are unique. The latter
has a serious problem in that it will eventually run
into the 32768 table definition limit.
> > All connections can see the definition of temporary tables;The "on commit preserve" clause does not allow data sharing between
> temporary tables are part of the global name space. No connection can
> > see data stored in a temporary table by another connection.
>
>Once committed with "ON COMMIT PRESERVE" only, or in both cases?
connections. It allows a single connection to keep its temporary
data across its transactions.
> > A temporary table can be either the referenced or referencingRight. On delete commit is an entirely different kettle of fish.
> table in a foreign key constraint, but the partner table must
> > be a temporary table. If either table is ON DELETE COMMIT, both must
> be ON DELETE COMMIT.
> >
>
>I think the above should read "ON COMMIT DELETE" x 2.
Cheers,
Ann