Subject | Re: [Firebird-Architect] RFC: Proposal for the implementation |
---|---|
Author | Dmitry Yemanov |
Post date | 2004-11-24T10:24:01Z |
"Ann W. Harrison" <aharrison@...> wrote:
of this term? If no, there's no need to follow the spec. I prefer good
practice over abstract non-materialized theory.
consistent with the standard.
that its globality is defined in terms of sessions. GTT persists in the
system schema, so it's visible for all. This is what "global" means for
them. The only exception is DB2.
Sybase, PostgreSQL and InterBase. If we don't understand what the SQL spec
means and if nobody supports what it looks to mean, then I see no reason to
follow this meaning.
to ask whether your proposal covers only GTTs (in my understanding) or both?
If the latter, there were no mentions on how it could be implemented.
<subquery> is defined for all types of tables, including pesistent ones. If
you mean implicit DDL autocommit, then we'll have a problem with non-atomic
execution of CREATE TABLE. Or you had in mind that AS <subquery> is to be
implemented for TTs only and TTs are designed to avoid DFW and allocate the
root pages immediately?
Dmitry
>I think so.
> Let me see if I can follow all of this through. Does everyone agree
> that the standard specifies that the data in temporary tables are
> SQL-session objects and that a SQL-session is equivalent to a connection?
> OK, now does everyone agree that the standard uses LOCAL and GLOBALDo you know any RDBMS which support SQL-client modules in your understanding
> to define the scope of temporary table data between SQL-client modules
> and that we don't support SQL-client modules?
of this term? If no, there's no need to follow the spec. I prefer good
practice over abstract non-materialized theory.
> >Oracle supports GLOBAL TEMPORARY TABLE with global schema andWe don't need to implement LOCAL at all at this stage and we'll still be
> >session-specific data. AFAIU, this is what you propose. Oracle does not
> >support LOCAL TEMPORARY TABLE (at least in v9).
>
> OK, so if we added { GLOBAL | LOCAL } with LOCAL ::= notYetImplemented,
> then we'd be consistent with the standard (my opinion at least) and
> with Oracle.
consistent with the standard.
> OK, how many people think we should show our independence by ignoringDefinitely, not me ;-)
> the standard and the four implementations that are more or less compliant
> with it and follow the lead of MSSQL?
> > MySQL has just TEMPORARY TABLE which is visible only for thealso
> >current session. PostgreSQL offers only LOCAL TEMPORARY TABLE which is
> >visible for the current session only.Definition.
>
> When you say visible, do you refer to the definition or the
> data? Or both?
> >So everybody distinguishes between GLOBAL and LOCAL in terms of the userI meant that if DBMS declares GLOBAL TEMP TABLE, then it explicitly states
> >session.
>
> Hunh? Sorry. I thought you said that the visibility of the table
> definition was governed by the use of schemas and that the data was
> in all cases (except MSSQL) private to the connection.
that its globality is defined in terms of sessions. GTT persists in the
system schema, so it's visible for all. This is what "global" means for
them. The only exception is DB2.
> >Everybody considers GLOBAL visible to other sessions except DB2I don't buy this argument, sorry. What you propose is named GTT in Oracle,
> >(and perhaps MySQL). Everybody offers session-specific data for GLOBAL
> >except MSSQL. Can we stick to the majority and name our implementation
> >accordingly?
>
> Sorry, the standard is very clear about the meaning of GLOBAL and
> LOCAL. I really don't see why we should choose some other meaning.
Sybase, PostgreSQL and InterBase. If we don't understand what the SQL spec
means and if nobody supports what it looks to mean, then I see no reason to
follow this meaning.
> > > No connection can see data stored in a temporary table by anotherOK, at least this is quite consistent and understandable.
> >connection.
> >
> >Questionable decision, but it seems it's what almost everybody supports.
>
> And what the standard specifies.
> >Agreed, but a change between DELETE ROWS and PRESERVE ROWS should beOf course.
> >allowed.
>
> OK, but it requires that you get a relation existence lock so you
> don't change the semantics of a compiled request.
> >Requires more thinking. What about PAG_temporary flag which means that aYep, this is something I was thinking about.
> >page I/O should be redirected to the TempSpace object instead of PIO?
>
> Dmitry - it's late. Not a flag. But essentially, that's the idea -
> that the lower parts of the I/O system - searching for free space etc.
> would be subclassed to handle data outside the database.
> >1) LOCAL can be implementedIt can, although I'm not sure it will be an elegant solution. I just wanted
>
> What you mean by local can't be implemented without a multi-layer
> name space.
to ask whether your proposal covers only GTTs (in my understanding) or both?
If the latter, there were no mentions on how it could be implemented.
> >2) AS <subquery> can be implementedYou cannot insert data in the table which is not committed. Note that AS
>
> That, I think, is a question of pulling together some existing
> mechanisms, cleaning them up, then generalizing and specializing
> them.
<subquery> is defined for all types of tables, including pesistent ones. If
you mean implicit DDL autocommit, then we'll have a problem with non-atomic
execution of CREATE TABLE. Or you had in mind that AS <subquery> is to be
implemented for TTs only and TTs are designed to avoid DFW and allocate the
root pages immediately?
Dmitry