IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Oracle Discussion :

[vue Materialise] - On Commit


Sujet :

Oracle

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé Avatar de jacquesh
    Profil pro
    Développeur informatique
    Inscrit en
    Février 2005
    Messages
    269
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Février 2005
    Messages : 269
    Par défaut [vue Materialise] - On Commit
    Bonjour,

    J'ai une question : suite à une recherche sur le METALINK, les bouquins DBA ORACLE PRESS, ... je n'arrive pas a trouver un exemple d'une vue matérialisé qui fonctionne avec l'option 'ON COMMIT'.

    Quelques soit les options testés j'ai toujours une erreur ORA-12054.

    Quelqu'un peut il me fournir une requête de création d'une vue matérialisé qui fonctionne avec l'option 'on commit'

    Version : Oracle 8.1.7.4

    une idée.

  2. #2
    Expert éminent
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Par défaut
    Tu ne dois pas respecter les conditions d'utilisation de cette option

    Explanation
    -----------

    One of the mandatory requirements for creation of an on-commit materialized
    view has not been satisfied.

    ON-COMMIT :
    Refresh occurs automatically when a transaction that modified one of the
    materialized view's fact tables commits.
    Can be used with materialized views on single table aggregates
    and with materialized views containing joins only.


    As can be seen from above, an ON-COMMIT can be used only under specific cases:
    These are:

    1. The M.V. should have a single table aggregate or
    2. the M.V. should have a join only.
    3. count(*) must be present for Single-Table Aggregates (see example above).
    4. count(<col>) should be present.
    Here, <col> stands for the column which is being aggregated.
    Note: the only time that count(col)is not required is when
    the aggregate itself is a count(col).
    5. It should be possible perform a fast refresh on the materialized view.

    Fast refresh by itself has a few restrictions.
    These are as follows:
    a)The FROM list must contain base tables only (that is, no views).
    b)It cannot contain references to non-repeating expressions like
    SYSDATE and ROWNUM.
    c)It cannot contain references to RAW or LONG RAW data types.
    d)It cannot contain HAVING or CONNECT BY clauses.
    e)The WHERE clause can contain only joins and they must be equi-joins
    (inner or outer) and all join predicates must be connected with
    ANDs. No selection predicates on individual tables are allowed
    f)It cannot have subqueries, inline views, or set functions like
    UNION or MINUS.


    In addition for M.V.'s with Single-Table Aggregates and Materialized Views
    with Joins and Aggregates, there are some more conditions on refresh
    to the ones mentioned above:

    Single Table Aggregates:
    =======================
    i) They can only have a single table.
    ii) The SELECT list must contain all GROUP BY columns.
    iii) Expressions are allowed in the GROUP BY and SELECT
    clauses provided they are the same.
    iv) They cannot have a WHERE clause.
    v) They cannot have a MIN or MAX function.
    vi) A materialized view log must exist on the table and must contain all
    columns referenced in the materialized view. The log must have been
    created with the INCLUDING NEW VALUES clause.
    vii) If AVG(expr) or SUM(expr) is specified, you must have COUNT(expr).
    viii) If VARIANCE(expr) or STDDEV(expr) is specified,
    you must have COUNT(expr) and SUM(expr).

    Joins and Aggregates :
    =====================

    i)The WHERE clause can contain inner equi-joins only
    (that is, no outer joins)
    ii)Materialized views from this category are FAST refreshable after
    Direct Load to the base tables; they are not FAST refreshable after
    conventional DML to the base tables.
    iii)Materialized views from this category can have only the
    ON DEMAND option (so, the on-commit cannot be used for this category).

  3. #3
    Membre éclairé Avatar de jacquesh
    Profil pro
    Développeur informatique
    Inscrit en
    Février 2005
    Messages
    269
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Février 2005
    Messages : 269
    Par défaut
    cette réponse est plus complète que le bouquin d'oracle.

    c'est quoi ta source ? pas le MEtALINK j'espère... (j'aurai mal recherché )

    merci pour l'info.

  4. #4
    Expert éminent
    Avatar de orafrance
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    15 967
    Détails du profil
    Informations personnelles :
    Âge : 48
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Par défaut
    si metalink... 1° lien il me semble

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [10g] Vue materialisée REFRESH ON COMMIT avec SELECT complexe
    Par carreau dans le forum SQL
    Réponses: 2
    Dernier message: 17/05/2013, 16h57
  2. [vue Materialiser] - Needs_compile
    Par jacquesh dans le forum Oracle
    Réponses: 6
    Dernier message: 16/11/2006, 17h40
  3. Réponses: 10
    Dernier message: 27/04/2006, 16h03
  4. vue materialisée: rafraichissement fast
    Par aline dans le forum Oracle
    Réponses: 6
    Dernier message: 04/01/2006, 10h51
  5. [Oracle 9] Vue materialisée indexée et optimisation
    Par scornille dans le forum Oracle
    Réponses: 4
    Dernier message: 18/11/2005, 15h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo