Bonjour,
J'aimerai savoir que fait exactement cette commande
DBMS_UTILITY.ANALYZE_SCHEMA
Merci
Pascal
Bonjour,
J'aimerai savoir que fait exactement cette commande
DBMS_UTILITY.ANALYZE_SCHEMA
Merci
Pascal
Elle analyse tous les objets d'un schéma (tables et indexes).
Rien ne vaut la doc ! ;-)
http://download-uk.oracle.com/docs/c...htm#sthref9306
et même si par malheur vous n'avez pas accès à la doc (ANALYZE_SCHEMA Procedure
Note:
This subprogram is obsolete with Oracle Database Release 10g. It is retained in documentation for reasons of backward compatibility. For current functionality, see Chapter 103, "DBMS_STATS".
This procedure runs the ANALYZE command on all the tables, clusters, and indexes in a schema. Use this procedure to collect nonoptimizer statistics. For optimizer statistics, use the DBMS_STATS.GATHER_SCHEMA_STATS procedure.
Syntax
DBMS_UTILITY.ANALYZE_SCHEMA (
schema VARCHAR2,
method VARCHAR2,
estimate_rows NUMBER DEFAULT NULL,
estimate_percent NUMBER DEFAULT NULL,
method_opt VARCHAR2 DEFAULT NULL);
Parameters
Table 116-8 ANALYZE_SCHEMA Procedure Parameters
Parameter Description
schema Name of the schema.
method One of ESTIMATE, COMPUTE or DELETE.
If ESTIMATE, then either estimate_rows or estimate_percent must be nonzero.
estimate_rows Number of rows to estimate.
estimate_percent Percentage of rows to estimate.
If estimate_rows is specified, then ignore this parameter.
method_opt Method options of the following format:
[ FOR TABLE ]
[ FOR ALL [INDEXED] COLUMNS] [SIZE n]
[ FOR ALL INDEXES ]
Exceptions
Table 116-9 ANALYZE_SCHEMA Procedure Exceptions
Exception Description
ORA-20000 Insufficient privileges for some object in this schema.), il reste toujours le "header" du package qui est toujours en clair et qui très souvent contient des informations complémentaires :
procedure analyze_schema(schema varchar2, method varchar2,
estimate_rows number default null,
estimate_percent number default null, method_opt varchar2 default null);
-- Analyze all the tables, clusters and indexes in a schema.
-- Input arguments:
-- schema
-- Name of the schema.
-- method, estimate_rows, estimate_percent, method_opt
-- See the descriptions above in sql_ddl.analyze.object.
-- Exceptions:
-- ORA-20000: Insufficient privileges for some object in this schema.
youps , j'ai mal posé ma question :
Quelles sont les incidences sur la base d'une telle commande comment peut on l'analyser?
merci pour les précendes réponses
merci d'avance
Pascal
Qui dit calcul des stats, dit changement probable de plan d'exécutions, donc les perfs vont être impactées (à priori en mieux, mais on ne sait jamais). heureusement, il est possible d'effacer les stats !![]()
Sinon, le calcul des stats entraine la pose de verrous sur les objets le temps du calcul. Selon les volumes et les impératifs, cela peut poser de sérieux problèmes.
Partager