Subject | Re: [Firebird-Architect] Global Temporary Tables |
---|---|
Author | Dmitry Yemanov |
Post date | 2005-01-23T10:06:21Z |
"Vlad Horsun" <hvlad@...> wrote:
the Ann's proposal of GTTs, implements the separate page storage mechanism
we seemed to agree on, and is expected to become a low-level basis for
session scope temporary tables / transient datasets requested by the sponsor
(to be discussed later separately).
table can reference a PRESERVE ROWS one, then why both cannot reference any
of persistent tables?
Vlad, I also expect that a "reference" term used here is not limited to FK
constraints, but covers also CHECK constraints, triggers, computed columns,
etc. Is it correct?
it in BDB? How should I become aware of it?
Dmitry
>Just wanted to add that Vlad's work is approved by myself, mostly reflects
> During last two months i did some research and implementation of
> global temporary tables. Here i want to show what i has done and listen
> your opinions and critics.
the Ann's proposal of GTTs, implements the separate page storage mechanism
we seemed to agree on, and is expected to become a low-level basis for
session scope temporary tables / transient datasets requested by the sponsor
(to be discussed later separately).
> GTT's can have indexes, triggers, field and table constraints as permanentIMO, these two rules are not consistent with each other. If a DELETE ROWS
> tables. All constraints between any kind of permanent and temporary tables
> follow the rule below:
>
> a) references between permanent and temporary tables are forbidden
> b) GTT with ON COMMIT PRESERVE ROWS can't reference on GTT
> with ON COMMIT DELETE ROWS
table can reference a PRESERVE ROWS one, then why both cannot reference any
of persistent tables?
Vlad, I also expect that a "reference" term used here is not limited to FK
constraints, but covers also CHECK constraints, triggers, computed columns,
etc. Is it correct?
> Domain constraints also can't reference on GTT.Agreed.
> At blob creation time engine not know in which relation (permanent orblob
> temporary) this blob will be attached when materialized. Therefore when
> will be materialized may arise necessity to move it from initial ("base")page
> space into page space of the appropriate relation. To avoid such waste ofbe
> time i propose extension of blob parameter block (used when blob created).
> This extension allows to set initial page space in which blob pages will
> allocated before materialization. No public API change is necessary, onlyWhat is a "page space" at the API level? What value should I provide to use
> few new constants.
it in BDB? How should I become aware of it?
> When user create new index already existing GTT's instances will notAgreed.
> know about it (and don't build it of course). Only new instances will read
> new index definition from "base" index root page and build it.
> Current implementation allows to have follow kinds of storage forI'd stick with hardcoded option (2), but this is just me.
> temporary page spaces:
>
> 1. No temporary page spaces - all inside database
> 2. Page space per attachment
> 3. Page space per engine process (one common page space for SS or
> separate page space per CS process)
>
> Now it is hardcoded but can easy be moved into configuration file.
Dmitry