Subject | RE: [Firebird-Architect] RFC: Proposal for the implementation of Temporary Tables. |
---|---|
Author | Claudio Valderrama C. |
Post date | 2004-11-24T03:07:46Z |
Paul Beach wrote:
acknowledge that, because you wrote:
the correct syntax from the beginning.
delete.
:-)
remember that rdb$relations has already a flags fields, so it could be used
if none of the previous arguments apply. Anyway, RDB$RELATION_TYPE is a
confusing name because it's used to distinguish tables from views.
seems better to suffer the burden of having temporary files at the cost of
writing more code.
C.
> Syntax:This is a globally visible table. Even if cumbersome, the syntax should
>
> CREATE TEMPORARY TABLE <table name> <table contents source>
> [ON COMMIT {PRESERVE | DELETE} ROWS]
acknowledge that, because you wrote:
> All connections can see the definition of temporary tables;Even if we are going to discuss a month what's global and local, please make
> temporary tables are part of the global name space. No connection can
> see data stored in a temporary table by another connection.
the correct syntax from the beginning.
> A temporary table can be either the referenced orON COMMIT DELETE do you mean? The other way it should be named auto-commit
> referencing 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.
delete.
:-)
> System table support:Is this done for performance reasons, for keeping the code simple or what? I
> A new field will be added to RDB$RELATIONS, called
> RDB$RELATION_TYPE.
remember that rdb$relations has already a flags fields, so it could be used
if none of the previous arguments apply. Anyway, RDB$RELATION_TYPE is a
confusing name because it's used to distinguish tables from views.
> The syntax AS <query expression> has been suggested as anSomeone will have to dig into it.
> alternative to the <table contents source> listed in the syntax
> above. If that syntax is part of the SQL-99 standard, I can't find
> it.
> Data and indexes for a temporary table could be stored on pagesConsidering the performance and reliability impact of temporary tables, it
> in the active database or in a temporary file created for the
> instance. Each alternative has advantages.
>
> Using the active database leverages the existing structures.
> Free space can be located with existing mechanisms completely
> unchanged. Page number references in indexes and blobs can be
> used directly. Cleaning up the pages used by a temporary table in
> the case of a system crash is problematic.
>
> Using a temporary file requires that space management and all
> page references be redirected to the temporary file, increasing the
> number of layers that must be aware of this change. A temporary
> file is automatically destroyed in case of system failure.
seems better to suffer the burden of having temporary files at the cost of
writing more code.
C.