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 :

Statistiques de colonnes


Sujet :

Oracle

  1. #1
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 63
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut Statistiques de colonnes
    Bonjour les forumistes...
    Le DBMS_STAT.gather .. fait-il en même temps les stats de colonnes ?

    Merci pour vos réponses ...

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

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    oui si tu changes les options. Je t'invite à aller lire la doc

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

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    tu peux lire la note : 122371.1

    Mais je te conseille de ne le faire que sur quelques colonnes et donc utiliser DBMS_STATS (noyau Oracle)

  4. #4
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 63
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut
    Excuse-moi Fred mais je n'ai pas compris la phrase :

    Mais je te conseille de ne le faire que sur quelques colonnes et donc utiliser DBMS_STATS (noyau Oracle)
    Je fais bien des dbms_stats.gather.table où schéma.. et pas des Analyze... alors ?

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

    Informations forums :
    Inscription : Janvier 2004
    Messages : 15 967
    Points : 19 073
    Points
    19 073
    Par défaut
    désolé, je croyais que tu utilisais fnd_stats

    Alors voila la description (que tu trouves dans dba_source):
    procedure gather_table_stats
    (ownname varchar2, tabname varchar2, partname varchar2 default null,
    estimate_percent number default null, block_sample boolean default FALSE,
    method_opt varchar2 default 'FOR ALL COLUMNS SIZE 1',
    degree number default null,
    granularity varchar2 default 'DEFAULT', cascade boolean default FALSE,
    stattab varchar2 default null, statid varchar2 default null,
    statown varchar2 default null,
    no_invalidate boolean default FALSE);
    --
    -- This procedure gathers table and column (and index) statistics.
    -- It attempts to parallelize as much of the work as possible, but there
    -- are some restrictions as described in the individual parameters.
    -- This operation will not parallelize if the user does not have select
    -- privilege on the table being analyzed.
    --
    -- Input arguments:
    -- ownname - schema of table to analyze
    -- tabname - name of table
    -- partname - name of partition
    -- estimate_percent - Percentage of rows to estimate (NULL means compute).
    -- The valid range is [0.000001,100]. Use the constant
    -- DBMS_STATS.AUTO_SAMPLE_SIZE to have Oracle determine the
    -- appropriate sample size for good statistics.
    -- block_sample - whether or not to use random block sampling instead of
    -- random row sampling. Random block sampling is more efficient, but
    -- if the data is not randomly distributed on disk then the sample values
    -- may be somewhat correlated. Only pertinent when doing an estimate
    -- statistics.
    -- method_opt - method options of the following format
    -- size_clause := SIZE [integer | auto | skewonly | repeat],
    -- where integer is between 1 and 254
    -- FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause]
    -- FOR COLUMNS [size_clause]
    -- column|attribute [size_clause]
    -- [,column|attribute [size_clause] ... ]

    -- Optimizer related table statistics are always gathered.
    -- degree - degree of parallelism (NULL means use of table default value
    -- which was specified by DEGREE clause in CREATE/ALTER TABLE statement)
    -- Use the constant DBMS_STATS.DEFAULT_DEGREE for the default value
    -- based on the initialization parameters.
    -- granularity - the granularity of statistics to collect (only pertinent
    -- if the table is partitioned)
    -- 'DEFAULT' - gather global- and partition-level statistics
    -- 'SUBPARTITION' - gather subpartition-level statistics
    -- 'PARTITION' - gather partition-level statistics
    -- 'GLOBAL' - gather global statistics
    -- 'ALL' - gather all (subpartition, partition, and global) statistics
    -- cascade - gather statistics on the indexes for this table.
    -- Index statistics gathering will not be parallelized. Using this
    -- option is equivalent to running the gather_index_stats procedure
    -- on each of the table's indexes.
    -- stattab - The user stat table identifier describing where to save
    -- the current statistics.
    -- statid - The (optional) identifier to associate with these statistics
    -- within stattab.
    -- statown - The schema containing stattab (if different then ownname)
    -- no_invalidate - Do not invalide the dependent cursors if set to TRUE.
    -- When the 'cascade' argument is specified, not pertinent with certain
    -- types of indexes described in the gather_index_stats section.
    --
    -- Exceptions:
    -- ORA-20000: Table does not exist or insufficient privileges
    -- ORA-20001: Bad input value
    -- ORA-20002: Bad user statistics table, may need to upgrade it
    --

  6. #6
    Membre habitué
    Homme Profil pro
    CMA-CGM
    Inscrit en
    Novembre 2005
    Messages
    531
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 63
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : CMA-CGM
    Secteur : Transports

    Informations forums :
    Inscription : Novembre 2005
    Messages : 531
    Points : 137
    Points
    137
    Par défaut
    Ben en fait, j'ai aussi utilisé le programme de stat issu d'Oracle Appli 'fndgstst' sur 5 schémas...

    1°) Peux-tu me dire quelle est la différence entre le programme 'fndgstst' et les stats qu'on récolte via DBMS-STATS.gather (schéma ou table) ?

    2°) Laquelle des deux méthodes est-elle meilleure ?

    3°) 'Fndgstst' est-il le programme envoyé par Oracle Appli quand on effectue la collecte des stats via OracleAppli (avec en paramètre, le schéma, le pourcentage etx...)



    Merci pour tes réponses...

Discussions similaires

  1. [XL-2003] Statistiques des champs d'une colonne
    Par seyflo dans le forum Excel
    Réponses: 11
    Dernier message: 27/05/2010, 12h27
  2. Statistiques sur les colonnes => densité
    Par tibal dans le forum Administration
    Réponses: 12
    Dernier message: 17/05/2010, 16h51
  3. Faire des statistiques sur des colonnes
    Par davdoo91 dans le forum BIRT
    Réponses: 7
    Dernier message: 24/06/2009, 15h22
  4. Statistique sur addition de colonnes
    Par andreditdd dans le forum Bases de données
    Réponses: 7
    Dernier message: 04/03/2007, 15h54
  5. statistiques sur les lignes et colonnes d'un fichier
    Par ericbareke dans le forum Langage
    Réponses: 5
    Dernier message: 23/03/2006, 16h09

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