// QDB_DBMS_GEN_MANAGED_SKELETON // Generated contract scaffold. Business logic must be implemented manually. #ifndef DBMS_STATS_INTERNAL_HPP #define DBMS_STATS_INTERNAL_HPP /** * @brief DBMS_STATS: Импортировано из Oracle API inventory: /home/dev/rudb_dbms_gen_output/oracle_inventory/rudb_api_inventory.tsv * @details * Назначение: * Импортировано из Oracle API inventory: * /home/dev/rudb_dbms_gen_output/oracle_inventory/rudb_api_inventory.tsv */ extern "C" { #include "postgres.h" #include "fmgr.h" } // extern "C" extern "C" { /** * @brief функция dbms_stats_clob_to_varray. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_clob_to_varray(CAST(NULL AS clob)); * @param cl `clob`, входное значение. * @return `text` — return_value. */ Datum dbms_stats_clob_to_varray(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_column_need_hist. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_column_need_hist(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param colname `varchar2`, входное значение. * @param method_opt `varchar2`, входное значение. * @return `number` — return_value. */ Datum dbms_stats_column_need_hist(PG_FUNCTION_ARGS); /** * @brief ----------------------------------------------------------------------------- * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_configure_advisor_filter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS text)); * @param task_name `varchar2`, входное значение. * @param stats_adv_opr_type `varchar2`, входное значение. * @param configuration_type `varchar2`, входное значение. * @param filter `text`, входное значение, по умолчанию NULL (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_configure_advisor_filter(PG_FUNCTION_ARGS); /** * @brief ------------------- configure_advisor_obj_filter ---------------------------- * @details NAME: * configure_advisor_obj_filter * DESCRIPTION: * Configure object filter for a statistics advisor task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * stats_adv_opr_type (IN) - type of statistics advisor operation to * configure. See configure_advisor_rule_filter. * rule_name (IN) - name of the rule to configure. If null, apply * the filter to all object rules * ownname (IN) - owner name of object to filter * tabname (IN) - table name of object to filter * action (IN) - configuration action to take. * See configure_advisor_rule_filter. * RETURNS: * A clob of xml format containing the (updated) values of the filter. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_configure_advisor_obj_filter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param stats_adv_opr_type `varchar2`, входное значение. * @param rule_name `varchar2`, входное значение. * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param action `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_configure_advisor_obj_filter(PG_FUNCTION_ARGS); /** * @brief --------------------- configure_advisor_opr_filter -------------------------- * @details NAME: * configure_advisor_opr_filter * DESCRIPTION: * Configure operation filter for a statistics advisor task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * stats_adv_opr_type (IN) - type of statistics advisor operation to * configure. See configure_advisor_rule_filter. * rule_name (IN) - name of the rule to configure. If null, apply * the filter to all operation level rules * operation_name (IN) - operation name (e.g. 'gather_table_stats') * action (IN) - configuration action to take. * See configure_advisor_rule_filter. * RETURNS: * A clob of xml format containing the (updated) values of the filter. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_configure_advisor_opr_filter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param stats_adv_opr_type `varchar2`, входное значение. * @param rule_name `varchar2`, входное значение. * @param operation_name `varchar2`, входное значение. * @param action `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_configure_advisor_opr_filter_0(PG_FUNCTION_ARGS); /** * @brief --------------------- configure_advisor_opr_filter -------------------------- * @details NAME: * configure_advisor_opr_filter * DESCRIPTION: * Configure operation filter for a statistics advisor task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * stats_adv_opr_type (IN) - type of statistics advisor operation to * configure. See configure_advisor_rule_filter. * rule_name (IN) - name of the rule to configure. If null, apply * the filter to all operation level rules * operation_name (IN) - operation name (e.g. 'gather_table_stats') * ownname (IN) - owner name of the operation target. * Cannot be null. * tabname (IN) - table name of the operation target * action (IN) - configuration action to take. * See configure_advisor_rule_filter. * RETURNS: * A clob of xml format containing the (updated) values of the filter. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_configure_advisor_opr_filter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param stats_adv_opr_type `varchar2`, входное значение. * @param rule_name `varchar2`, входное значение. * @param operation_name `varchar2`, входное значение. * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param action `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_configure_advisor_opr_filter_1(PG_FUNCTION_ARGS); /** * @brief --------------------- configure_advisor_opr_filter -------------------------- * @details NAME: * configure_advisor_opr_filter * DESCRIPTION: * Configure operation filter for a statistics advisor task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * stats_adv_opr_type (IN) - type of statistics advisor operation to * configure. See configure_advisor_rule_filter. * rule_name (IN) - name of the rule to configure. If null, apply * the filter to all operation level rules * operation_id (IN) - operation id to configure. The filter will apply * to any operation with the same signature as the * given operation ID. If two operations have the * same signature, then they have the same value * for every parameter. The operation ID comes from * the ID column in dba_optstat_operations. * action (IN) - configuration action to take. * See configure_advisor_rule_filter. * RETURNS: * A clob of xml format containing the (updated) values of the filter. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_configure_advisor_opr_filter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param stats_adv_opr_type `varchar2`, входное значение. * @param rule_name `varchar2`, входное значение. * @param operation_id `number`, входное значение. * @param action `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_configure_advisor_opr_filter_2(PG_FUNCTION_ARGS); /** * @brief --------------------- configure_advisor_rule_filter ------------------------- * @details NAME: * configure_advisor_rule_filter * DESCRIPTION: * Configure rule filter for a statistics advisor task * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * stats_adv_opr_type (IN) - type of operation to configure. Possible values: * 'EXECUTE', 'REPORT', 'SCRIPT', 'IMPLEMENT' * combination of configure operation types are * allowed. For example, 'EXECUTE + REPORT'. * If this parameter is null, then the filter will * apply to all types of advisor operations. * rule_name (IN) - name of the rule to configure. If null, apply * the filter to all rules * action (IN) - configuration action to take for the given * rule. Possible values: * 'ENABLE': enable the filter * 'DISABLE: disable the filter * 'DELETE': delete the filter * 'SHOW': show the current filter value * RETURNS: * A clob of xml format containing the (updated) values of the filter. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_configure_advisor_rule_filter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param stats_adv_opr_type `varchar2`, входное значение. * @param rule_name `varchar2`, входное значение. * @param action `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_configure_advisor_rule_filter(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_to_bin_double. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_bin_double(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `binary_double` — return_value. */ Datum dbms_stats_convert_raw_to_bin_double(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_to_bin_float. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_bin_float(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `binary_float` — return_value. */ Datum dbms_stats_convert_raw_to_bin_float(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_to_date. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_date(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `date` — return_value. */ Datum dbms_stats_convert_raw_to_date(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_to_number. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_number(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `number` — return_value. */ Datum dbms_stats_convert_raw_to_number(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_to_nvarchar. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_nvarchar(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `nvarchar2` — return_value. */ Datum dbms_stats_convert_raw_to_nvarchar(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_to_rowid. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_rowid(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `rowid` — return_value. */ Datum dbms_stats_convert_raw_to_rowid(PG_FUNCTION_ARGS); /** * @brief Convert the internal representation of a minimum or maximum value * @details into a datatype-specific value. The minval and maxval fields * of the StatRec structure as filled in by get_column_stats or * prepare_column_values are appropriate values for input. * Input argument * rawval - The raw representation of a column minimum or maximum * Datatype specific output arguments: * resval - The converted, type-specific value * Exceptions: * None * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_to_varchar2(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `varchar2` — return_value. */ Datum dbms_stats_convert_raw_to_varchar2(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_conv_raw. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_conv_raw(CAST(NULL AS raw), CAST(NULL AS number)); * @param rawval `raw`, входное значение. * @param type `number`, входное значение. * @return `varchar2` — return_value. */ Datum dbms_stats_conv_raw(PG_FUNCTION_ARGS); /** * @brief ---------------------------- create_advisor_task ---------------------------- * @details NAME: * create_advisor_task * DESCRIPTION: Creates an advisor task for the Statistics Advisor. * PARAMETERS: * task_name (IN) - name of the advisor task(optional). If not * specified, will automatically generate a unique * name for the new task. * RETURNS: * Unique name of the statistics advisor task. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_create_advisor_task(CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение, по умолчанию NULL (source CSV). * @return `varchar2` — return_value. */ Datum dbms_stats_create_advisor_task(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details ownname - owner of the table. Specify null for the current schema. * tabname - table for which statistics are to be compared. * time_stamp - time stamp to get statistics from the history * pctthreshold - The function report difference in statistics * only if it exceeds this limit. The default value is 10. * NOTE: * If the time_stamp parameter is null, the function compares the current * statistics in the dictionary with the pending statistics. This is the * default * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_create_extended_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param extension `varchar2`, входное значение. * @return `varchar2` — return_value. */ Datum dbms_stats_create_extended_stats_0(PG_FUNCTION_ARGS); /** * @brief This function creates a column stats entry in the system for a user * @details specified column group or an expression in a table. Statistics for this * extension will be gathered when user or auto statistics gathering job * gathers statistics for the table. We call statistics for such an extension, * "extended statistics". This function returns the name of this newly created * entry for the extension. If the extension already exists then this function * throws an error. * Parameters: * ownname -- owner name of a table * tabname -- table name * extension -- can be either a column group or an expression. Suppose * the specified table has two column c1, c2. An example * column group can be '(c1, c2)', an example expression * can be '(c1 + c2)'. * Notes: * 1. An extension cannot contain a virtual column. * 2. You can not create extensions on tables owned by SYS. * 3. You can not create extensions on cluster tables, index organized * tables, temporary tables, external tables. * 4. Total number of extensions in a table cannot be greater than * maximum of (20, 10 % of number of non-virtual columns in the table). * 5. Number of columns in a column group must be in the range [2, 32]. * 6. A column can not appear more than once in a column group. * 7. Column group can not contain expressions. * 8. An expression must contain at least one column. * 9. An expression can not contain subquery. * 10. COMPATIBLE parameter needs to be 11.0.0.0.0 or greater. * Exceptions: * ORA-20000: Insufficient privileges / creating extension is not supported * ORA-20001: Error when processing extension * ORA-20007: Extension already exist * ORA-20008: Reached the upper limit on number of extensions * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_create_extended_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_create_extended_stats_1(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details ownname - owner of the table. Specify null for current schema. * tabname - table for which statistics are to be compared. * stattab1 - user stats table 1. * stattab2 - user stats table 2. If null, statistics in stattab1 * is compared with current statistics in dictionary. * This is the default. * Specify same table as stattab1 to compare two sets * within the stats table (Please see statid below). * pctthreshold - The function report difference in statistics * only if it exceeds this limit. The default value is 10. * statid1 - (optional) identifies statistics set within stattab1. * statid2 - (optional) identifies statistics set within stattab2. * stattab1own - The schema containing stattab1 (if different than ownname) * stattab2own - The schema containing stattab2 (if different than ownname) * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_diff_table_stats_in_history(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS text), CAST(NULL AS text), CAST(NULL AS number)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param time1 `text`, входное значение. * @param time2 `text`, входное значение, по умолчанию NULL (source CSV). * @param pctthreshold `number`, входное значение, по умолчанию 10 (source CSV). * @return `text` — return_value. */ Datum dbms_stats_diff_table_stats_in_history(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details ownname - owner of the table. Specify null for current schema. * tabname - table for which statistics are to be compared. * time1 - first time stamp * time2 - second time stamp * pctthreshold - The function report difference in statistics * only if it exceeds this limit. The default value is 10. * NOTE: * If the second timestamp is null, the function compares the current * statistics in dictionary with the statistics as of the other timestamp. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_diff_table_stats_in_pending(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS text), CAST(NULL AS number)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param time_stamp `text`, входное значение, по умолчанию NULL (source CSV). * @param pctthreshold `number`, входное значение, по умолчанию 10 (source CSV). * @return `text` — return_value. */ Datum dbms_stats_diff_table_stats_in_pending(PG_FUNCTION_ARGS); /** * @brief This procedure copies the statistics of the source [sub] partition to the * @details destination [sub] partition. It also copies statistics of all dependent * objects such as columns and local indexes. If the statistics for source * are not available, then nothing is copied. It can optionally scale the * statistics (such as the number of blks, or number of rows) based on the * given scale_factor. * Usage notes: * a) To invoke this procedure you must be owner of the table, or you need * the ANALYZE ANY privilege. For objects owned by SYS, you need to be * either the owner of the table, or you need the ANALYZE ANY DICTIONARY * privilege or the SYSDBA privilege. * b) This procedure updates the minimum and maximum values of destination * partition for the first partitioning column as follows: * - If the partitioning type is HASH the minimum and maximum values of the * destination partition are same as that of the source partition. * - If the partitioning type is LIST then * if the destination partition is a NOT DEFAULT partition then * The minimum value of the destination partition is set to the * minimum value of the value list that describes the destination * partition. * The maximum value of the destination partition is set to the * maximum value of the value list that describes the destination * partition. * Alternatively, if the destination partition is a DEFAULT partition, then * The minimum value of the destination partition is set to the minimum * value of the source partition * The maximum value of the destination partition is set to the maximum * value of the source partition * - If the partitioning type is RANGE then * The minimum value of the destination partition is set to the high bound * of previous partition unless the destination partition is the first * partition. For the first partition, the minimum value is set to the * high bound of the destination partition. * The maximum value of the destination partition is set to the high bound * of the destination partition unless the high bound of the destination * partition is MAXVALUE, in which case the maximum value of the * destination partition is set to the high bound of the previous * partition. * c) Additional modification to minimum and maximum values if the * partitioning type is RANGE: * - If the source partition column's minimum value is equal to its maximum * value, and both are equal to the source partition's lower bound, and * it has a single distinct value, then the destination partition column's * minimum and maximum values are both set to the destination partition's * lower bound. This is done for all partitioning columns. * - If the above condition does not apply, second and subsequent * partitioning columns are updated as follows: * The destination partition column's maximum value is set to the greater * of the destination partition upper bound and the source partition * column's maximum value, with the following exception: if the * destination partition is D and its preceding partition is D-1 and the * key column to be adjusted is Cn, the maximum value for Cn is set to * the upper bound of D (ignoring the maximum value of the source * partition column) provided that the upper bounds of the previous key * column Cn-1 are the same in partitions D and D-1. * d) If the minimum and maximum values are different for a column after * modifications, and if the number of distinct values is less than 1, * the number of disctinct values is updated as 2. * e) This procedure does not copy statistics of the underlying subpartitions * if the source/destination is a partition of a composite partitioned table. * f) If the source and destination points to a subpartition, the minimum * and maximum of partitioning column(s) are adjusted based on bounds of * corresponding partition using same rules outlined above. * Parameters: * ownname - Schema of the table of source and destination * [sub] partitions * tabname - Table name of source and destination [sub] partitions * srcpartname - Source [sub] partition * dtspartname - Destination [sub] partition * scale_factor - Scale factor to scale nblks, nrows etc. in dstpartname * flags - Specify DBMS_STATS.UPDATE_GLOBAL_STATS to update the * global column statistics at partition or table level based * on the new bounds of the destination [sub] partition. * force - When value of this argument is TRUE copy statistics even * if the destination [sub]partition is locked * Exceptions: * ORA-20000: Invalid partition name * ORA-20001: Bad input value * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_diff_table_stats_in_stattab(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS number), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param stattab1 `varchar2`, входное значение. * @param stattab2 `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param pctthreshold `number`, входное значение, по умолчанию 10 (source CSV). * @param statid1 `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid2 `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab1own `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab2own `varchar2`, входное значение, по умолчанию NULL (source CSV). * @return `text` — return_value. */ Datum dbms_stats_diff_table_stats_in_stattab(PG_FUNCTION_ARGS); /** * @brief -------------------------- execute_advisor_task ----------------------------- * @details NAME: * execute_advisor_task * DESCRIPTION: executes a previously created statistics advisor task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * execution_name: (IN) - A name to qualify and identify an execution. * If not specified, it is automatically generated * by the advisor and returned by the function. * RETURNS: * Name of the new execution. * NOTES: * This function will give an error if the specified execution conflicts * with the name of an existing execution (when the given execution name * already exists). * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_execute_advisor_task(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param execution_name `varchar2`, входное значение, по умолчанию NULL (source CSV). * @return `varchar2` — return_value. */ Datum dbms_stats_execute_advisor_task(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_get_advisor_recs. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_advisor_recs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param rec `varchar2`, входное значение. * @param type `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_get_advisor_recs(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_get_compatible. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_compatible(); * @return `number` — return_value. */ Datum dbms_stats_get_compatible(PG_FUNCTION_ARGS); /** * @brief WARNING ** WARNING ---> obsoleted <--- WARNING ** WARNING * @details Please use SET_GLOBAL_PREFS() instead. * WARNING ** WARNING ---> obsoleted <--- WARNING ** WARNING * This procedure can be used to set default value for parameters * of dbms_stats procedures. * The function get_param can be used to get the current * default value of a parameter. * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * pname - parameter name * The default value for following parameters can be set. * CASCADE - The default value for CASCADE set by set_param * is not used by export/import procedures. * It is used only by gather procedures. * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * AUTOSTATS_TARGET * This parameter is applicable only for auto stats * collection. The value of this parameter controls * the objects considered for stats collection * It takes the following values * 'ALL' -- statistics collected * for all objects in system * 'ORACLE' -- statistics collected * for all oracle owned objects * 'AUTO' -- oracle decide which objects * to collect stats * pval - parameter value. * if null is specified, it will set the oracle default value * Notes: * Both arguments are of type varchar2 and values are enclosed in quotes, * even when they represent numbers * Examples: * dbms_stats.set_param('CASCADE','DBMS_STATS.AUTO_CASCADE'); * dbms_stats.set_param('ESTIMATE_PERCENT','5'); * dbms_stats.set_param('DEGREE','NULL'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_param(CAST(NULL AS varchar2)); * @param pname `varchar2`, входное значение. * @return `varchar2` — return_value. */ Datum dbms_stats_get_param(PG_FUNCTION_ARGS); /** * @brief This procedure is used to set the global statistics preferences. * @details This setting is honored only of there is no preference specified * for the table to be analyzed. * To run this procedure, you need to have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * pname - preference name * The default value for following preferences can be set. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * AUTOSTATS_TARGET * CONCURRENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * WAIT_TIME_TO_UPDATE_STATS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * pvalue - preference value. * if null is specified, it will set the oracle default value. * CASCADE: Please see CASCADE in gather_table_stats * DEGREE: Please see DEGREE in gather_table_stats * ESTIMATE_PERCENT: Please see ESTIMATE_PERCENT in gather_table_stats * METHOD_OPT: Please see METHOD_OPT in gather_table_stats * NO_INVALIDATE: Please see NO_INVALIDATE in gather_table_stats * GRANULARITY: Please see GRANULARITY in gather_table_stats * PUBLISH: The "PUBLISH" value determines whether or not newly gathered * statistics will be published once the gather job has completed. * Prior to 11g, once a statistic gathering job completed, the new * statistics were automatically published into the dictionary tables. * The user now has the ability to gather statistics but not publish * them immediately. This allows the DBA to test the new statistics * before publishing them. * INCREMENTAL: The "INCREMENTAL" value determines whether or not the global * statistics of a partitioned table will be maintained without doing a * full table scan. With partitioned tables it is very common to load new * data into a new partition. As new partitions are added and data loaded, * the global table statistics need to be kept up to date. Oracle will * update the global table statistics by scanning only the partitions that * have been changed instead of the entire table if the following conditions * hold: (1) the INCREMENTAL value for the partitioned table is set to TRUE; * (2) the PUBLISH value for the partitioned table is set to TRUE; and * (3) the user specifies AUTO_SAMPLE_SIZE for estimate_percent and AUTO for * granularity when gathering statistics on the table. * If the INCREMENTAL value for the partitioned table was set to FALSE * (default value), then a full table scan would be used to maintain the * global statistics. * INCREMENTAL_LEVEL: INCREMENTAL_LEVEL controls what synopses to collect when * 'INCREMENTAL' preference is set to 'TRUE'. It takes two values: * table -- table level synopses are gathered. This is used when user * wants to exchange this table with a partition. User can run * gather_table_stats on this table with 'INCREMENTAL' to 'TRUE' * and 'INCREMENTAL_LEVEL' to 'TABLE' before the exchange. Then table * level synopses are gathered on this table (for now we only support * table level synopses on non partitoned table). Then we do the * exchange. After the exchange, the partition will have synopses * which come from the table level synopses of the table before * exchange. This preference value can be only used in set_table_prefs. * It is not allowed in set_global/database/schema_prefs. * partition -- partition level synopses are gathered. This is the * default value. If 'partition' is set on a non partitioned table, * no synopses will be gathered. * INCREMENTAL_STALENESS: INCREMENTAL_STALENESS controls how we decide * a partition or subpartition as stale. It takes an enumeration of * values, i.e., 'USE_STALE_PERCENT', 'USE_LOCKED_STATS' and 'ALLOW_ * MIXED_FORMAT'. Multiple values are allowed, e.g., 'USE_STALE_PERCENT, * USE_LOCKED_STATS, ALLOW_MIXED_FORMAT' * 'USE_STALE_PERCENT': a partition/subpartition is NOT considered as * stale if DML changes are less the stale_percent preference value * 'USE_LOCKED_STATS': locked partitions/subpartitions stats are NOT * considered as stale, regardless of dml changes * 'ALLOW_MIXED_FORMAT': partitions with synopses in adaptive sampling * (AS) format are NOT considered as stale even when approximate_ndv_ * algorithm preference is 'HYPERLOGLOG' * 'NULL' - this means a partition/subpartition. * is considered as stale as long as it has any DML changes. When the * default value is used, statistics gathered in incremental mode are * guaranteed to be the same as the statistics gathered in non incremental * mode. When a non default value is used, the statistics gathered in * incremental mode might be less accurate than those gathered in non- * incremental mode. * The default value is 'ALLOW_MIXED_FORMAT'. * NOTE the following two are different. * command 1: dbms_stats.set_table_prefs('sh', 'sales', * 'incremental_staleness', 'null'); * command 2: dbms_stats.set_table_prefs('sh', 'sales', * 'incremental_staleness', null); * command 1 sets the preference value to 'null' while command 2 resets * the preference value to default which is 'ALLOW_MIXED_FORMAT'. * example of usage case: * case 1: stale_percent is 10; null is specified for incrmental_ * staleness; a partition has 5% of DML changes. Statistics of the * partition are regathered * case 2: stale_percent is 10; 'use_stale_percent' is specified; a * partition has 5% of DML changes. Statistis of the partition are * NOT regathered * case 3: stale_percent is 10; 'use_stale_percent' is specified; * a partition has 20% of DML changes; the partition is also locked. * The partition is considered as stale. Since it is locked, statistics * are not regathered. We fall back to the non incremental mode for * global statistics gathering * case 4: stale_percent is 10; 'use_stale_percent' is specified; a * partition has 5% of DML changes; the partition is also locked. * The partition is not considered as stale and its statistics are * not gathered. Its existing statistics are used to derive global * statistics * case 5: stale_percent is 10; 'use_locked_stats, use_stale_percent' is * specified; a partition has 20% of DML changes; the partition is also * locked. The partition is NOT considered as stale. Its existing statistics * are used to derive global statistics * case 6: approximate_ndv_algorithm is HLL. 'allow_mixed_format' is * specified. All partitions have synopses in old AS format. None * partition is considered stale. Its existing synopses are used * to derive global NDV (auto job will regather stats on partitions * with synospes of old AS format and replace them with synopses of * new HLL format). * GLOBAL_TEMP_TABLE_STATS: GLOBAL_TEMP_TABLE_STATS controls whether * the statistics gathered for a global temporary table should be stored * as shared statistics or session statistics. It takes two values: * 'SHARED': all sessions can see the statistics * 'SESSION': only the session in which the statistics are collected can * see the statistics * STALE_PERCENT: The "STALE_PERCENT" value determines the percentage of rows * in a table that have to change before the statistics on that table are * deemed stale and should be regathered. The default value is 10%. * AUTOSTATS_TARGET * This preference is applicable only for auto stats collection. The value * of this parameter controls the objects considered for stats collection. * It takes the following values * 'ALL' -- statistics collected for all objects in system * 'ORACLE' -- statistics collected for all oracle owned objects * 'AUTO' -- oracle decide which objects to collect stats * CONCURRENT * This preference determines whether the statistics of tables or * (sub)partitions of tables to be gathered concurrently when user issues * gather_*_stats procedures. DBMS_STATS has the ability to collect * statistics for a single object (table, (sub)partition) in parallel * based on the value of degree parameter. However the parallelism is * limited to one object. CONCURRENT preference extends the scope of * "parallelization" to multiple database objects by enabling users to * concurrently gather statistics for multiple tables in a schema/database * and multiple (sub)partitions within a table. Note that this is primarily * intented for multi cpu systems and it may not be suitable for small * databases on single cpu machines. * To gather statistics concurrently, * 1. The user must have DBA role or have the following privileges in * addition to privileges that are required for gathering statistics. * CREATE JOB, MANAGE SCHEDULER, MANAGE ANY QUEUE * 2. Resource Manager should be enabled. * 3. job_queue_processes parameter should be at least 4. * The preference takes the following values. * MANUAL: Concurrency is enabled only for manual statistics gathering. * AUTOMATIC: Concurrency is enabled only for the auto statistics gathering. * ALL: Concurrency is enabled for all statistics gathering calls. * OFF: Concurrency is disabled (default). * TABLE_CACHED_BLOCKS * The average number of blocks cached in the buffer cache for any table * we can assume when gathering the index clustering factor. * OPTIONS * The preference determines the 'options' parameter used in * gather_table_stats * The preference takes two values: * 'GATHER' (default) - Gather statistics for all objects in the table * 'GATHER AUTO' - Gather statistics for objects having missing or empty * statistics * We recommend setting 'GATHER AUTO' on tables that undergo bulk loads. * Statistics gathering on load will automatically gather statistics during * bulk load. Gather_table_stats on these tables with 'gather auto' options * will skip regathering the already fresh statistics. * STAT_CATEGORY * The preferece determines category of statistics that will be exported or * imported using export_*_stats/import_*_stats/datapump. It accepts * multiple values separated by comma. The values we support now are * 'OBJECT_STATS' (i.e., table statistics, column statistics and index * statistics) and 'SYNOPSES'. However synopses can only be exported/ * imported along with OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS (default value) * OBJECT_STATS, SYNOPSES * Note that the preference is not used in delete_*_stats procedures. * PREFERENCE_OVERRIDES_PARAMETER * This preference determines for a statistics operation, whether to * override the input value of a parameter with the preference value * of that parameter. * Possible values are: * 'FALSE'(default): input parameter values are obeyed * 'TRUE': input parameter values are ignored, and the value of * the corresponding preference is used. * Example: * If preference_overrides_parameter is set to 'TRUE', and the user issues * the following statistics operation: * dbms_stats.gather_table_stats('SCOTT', 'EMP', estimate_percent=>100); * Suppose the user has specified a table preference for estimate_percent * for table SCOTT.EMP 10, then that value will be used, and it will be * equivalent to issuing the following operation: * dbms_stats.gather_table_stats('SCOTT', 'EMP', estimate_percent=>10); * If the user did not specify a table preference for estimate_percent, * but has issued a global level preference value of 5, then it will be * equivalent to issuing the following operation: * dbms_stats.gather_table_stats('SCOTT', 'EMP', estimate_percent=>5); * If the user did not specify any preference for estimate_percent, * then the default value for estimate_percent will be used. It will be * equivalent to issuing the following opereation: * dbms_stats.gather_table_stats('SCOTT', 'EMP', * estimate_percent=>DBMS_STATS.AUTO_SAMPLE_SIZE); * The order of precedence is not changed if this preference is specified, * which is: * table preference > global preference > default * APPROXIMATE_NDV_ALGORITHM * Possible values for this preference are: * - HYPERLOGLOG: use Hyperloglog algorithm. * - ADAPTIVE SAMPLING: use adaptive sampling algorithm. * - REPEAT OR HYPERLOGLOG: * If incremental stats maintenance is disabled on the partitioned * table, then this preference is the same as 'HYPERLOGLOG' * If incremental stats maintenance is enabled on the partitioned * table: * - If the latest synopses gathered in this partitioned table uses * HYPERLOGLOG (ADAPTIVE SAMPLING respectively), then use * HYPERLOGLOG (ADAPTIVE SAMPLING respectively) for statistics * gathering. * - If no synopses exist yet for this partitioned table, then use * HYPERLOGLOG for statistics gathering. * AUTO_STAT_EXTENSIONS * This preference controls the automatic creation of extensions * while gathering (auto or manual) statistics. The values are * ON: extensions are created automatically as part of gathering * statistics based on usage of columns in the predicates in * the workload. * OFF: extensions are not created automatically. It will be created * only when create_extended_stats API is executed or when * extension is specified explicitly in method_opt clause of * gather API. This is the default. * WAIT_TIME_TO_UPDATE_STATS * This preference specifies the wait time, in minutes, before * timing out for locks and pins required for updating statistics. * It accepts values in the range, [0, 65535]. The default value is * 15 minutes. The special value 0 can be used to get the locks and * pins in no-wait mode. * ROOT_TRIGGER_PDB * This preference is used by App PDB user to determine whether to allow App * Root to interfere in the statistics gathering in PDB. * While gathering the statistics for a metadata linked table in App Root, * if the statistics in a PDB are stale, App Root will trigger the statistics * gathering in that PDB. User can execute or ignore that command from App * Root by using this preference. * Note: CDB Root, different from App Root, never triggers statistics * gathering on the PDBs and it is not controled by this preference. * Values are: * 'TRUE': allow the App Root trigger the statistics gathering on * metadata linked table in App PDB if the statisitcs on * PDB are stale. * 'FALSE'(default): ignore the statistics gathering command triggered from * App root. * COORDINATOR_TRIGGER_SHARD * This preference is used by user of each shard to determine whether to * allow shard coordinaotr to interfere in the statistics gathering in each * shards. While gathering the statistics in shard coordinator, if the * statistics in one of the shards are stale, shard coordinator will try to * trigger the statistics gathering in that shard. User can execute or ignore * that command from shard coordinator by using this preference. * Values are: * 'TRUE': allow the shard coordinator trigger the statistics * gathering on sharded table in local shard if the * statistics on local shard arestale. * 'FALSE'(default): ignore the statistics gathering command triggered from * shard coordinator. * AUTO_STATS_ADVISOR_TASK * This preference is used to control auto stats advisor task. * Values are: * 'TRUE'(default): statistics advisor will run after auto stats collection * 'FALSE': auto stats advisor task will be disabled. * Notes: * Both arguments are of type varchar2 and values are enclosed in quotes, * even when they represent numbers * Examples: * dbms_stats.set_global_prefs('ESTIMATE_PERCENT','9'); * dbms_stats.set_global_prefs('DEGREE','99'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param pname `varchar2`, входное значение. * @param ownname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param tabname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @return `varchar2` — return_value. */ Datum dbms_stats_get_prefs(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_get_row_count_estimate. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_row_count_estimate(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS number)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение. * @param nblks `number`, входное значение. * @param degree `number`, входное значение. * @return `number` — return_value. */ Datum dbms_stats_get_row_count_estimate(PG_FUNCTION_ARGS); /** * @brief This function returns the current retention value. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_stats_history_availability(); * @return `text` — return_value. */ Datum dbms_stats_get_stats_history_availability(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to change stats history retention * @details value. Stats history retention is used by both the automatic * purge and purge_stats procedure. * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * retention - The retention time in days. The stats history will be * ratained for at least these many number of days. * The valid range is [1,365000]. Also the following * values can be used for special purposes. * 0 - old stats are never saved. The automatic purge will * delete all stats history * -1 - stats history is never purged by automatic purge. * null - change stats history retention to default value * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_stats_history_retention(); * @return `number` — return_value. */ Datum dbms_stats_get_stats_history_retention(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_get_stat_tab_version. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_stat_tab_version(); * @return `number` — return_value. */ Datum dbms_stats_get_stat_tab_version(PG_FUNCTION_ARGS); /** * @brief ------------------------ implement_advisor_task ----------------------------- * @details NAME: * implement_advisor_task * DESCRIPTION: * Implements the actions recommended by the statistics advisor * PARAMETERS: * task_name: (IN) - name of the advisor task * execution_name: (IN) - A name to qualify and identify an execution. * If not specified, the latest execution of the * given task is used. * level (IN) - The level of the implementation of the * recommendations. Possible values are: * 'ALL' -> ignore the filters and implement all * the recommendations * 'TYPICAL' -> implement the recommendations * according to the filters in place * RETURNS: * A CLOB XML indicating which recommendations have been successfully * implemented. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_implement_advisor_task(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param execution_name `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_implement_advisor_task(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_report_advisor_task. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_advisor_task(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param execution_name `varchar2`, входное значение. * @param type `varchar2`, входное значение. * @param section `varchar2`, входное значение. * @param level `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_report_advisor_task(PG_FUNCTION_ARGS); /** * @brief This procedure deletes the recorded column (group) usage information from * @details dictionary. Column (group) usage information is used by gather procedures to * automatically determine the columns that require histograms. Also this * information is used by create_extended_stats to create extensions for the * group of columns seen in the workload. So resetting column usage will affect * these functionalities. This procedure should be used only in very rare cases * where you need to start from scratch and need to seed column usage all over * again. * Parameters: * ownname - owner name. If null it resets column usage information * for tables in all schemas in the database. * tabname - table name. If null, resets column usage information * for all tables of ownname. * If ownname and tabname is null, it will stop seeding column usage, if * currently seeding column usage using seed_col_usage. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_col_usage(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_report_col_usage(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_report_gather_auto_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_gather_auto_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_gather_auto_stats(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details 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. This is the default. * The default value can be changed using set_param procedure. * 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 * method_opt := FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause] * size_clause := SIZE [integer | auto | skewonly | repeat], * where integer is between 1 and 2048 * default is FOR ALL COLUMNS SIZE AUTO. * The default value can be changed using set_param procedure. * This value will be passed to all of the individual tables. * degree - degree of parallelism (NULL means use table default value which * is 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. * default for degree is NULL. * The default value can be changed using set_param procedure. * granularity - the granularity of statistics to collect (only pertinent * if the table is partitioned) * 'AUTO' - the procedure determines what level of statistics to collect * 'GLOBAL AND PARTITION' - 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 * default for granularity is AUTO. * The default value can be changed using set_param procedure. * cascade - gather statistics on the indexes as well. * Use the constant DBMS_STATS.AUTO_CASCADE to have Oracle determine * whether index stats to be collected or not. This is the default. * The default value can be changed using set_param procedure. * Using this option is equivalent to running the gather_index_stats * procedure on each of the indexes in the database in addition to * gathering table and column statistics. * stattab - The user stat table identifier describing where to save * the current statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * options - further specification of which objects to gather statistics for * 'GATHER' - gather statistics on all objects in the schema * 'GATHER AUTO' - gather all necessary statistics automatically. Oracle * implicitly determines which objects need new statistics, and * determines how to gather those statistics. When 'GATHER AUTO' is * specified, the only additional valid parameters are no_invalidate, * stattab, statid, objlist and statown; all other parameter settings * will be ignored. Also, return a list of objects processed. * 'GATHER STALE' - gather statistics on stale objects as determined * by looking at the *_tab_modifications views. Also, return * a list of objects found to be stale. * 'GATHER EMPTY' - gather statistics on objects which currently * have no statistics. also, return a list of objects found * to have no statistics. * 'LIST AUTO' - return list of objects to be processed with 'GATHER AUTO' * 'LIST STALE' - return list of stale objects as determined * by looking at the *_tab_modifications views * 'LIST EMPTY' - return list of objects which currently * have no statistics * objlist - list of objects found to be stale or empty * statown - The schema containing stattab. If null, it will assume * there is a table named stattab in each relevant schema in the * database if stattab is specified for saving current statistics. * gather_sys - Gather statistics on the objects owned by the 'SYS' user * as well. * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * When 'cascade' option is specified, not pertinent with certain types * of indexes described in the gather_index_stats section. * gather_temp - gather stats on global temporary tables also. The * temporary table must be created with "on commit preserve rows" clause, * and the statistics being collected are based on the data in the session * which this procedure is run but shared across all the sessions. * gather_fixed - Gather stats on fixed tables also. * Statistics for fixed tables can be collected only by user SYS. * Specified values for the following arguments will be ignored while * gathering statistics for fixed tables. * gathering statistics for fixed tables. * estimate_percent, block_sample, stattab, statid, statown * It will not invalidate the dependent cursors on fixed table * on which stats is collected. * This option is meant for internal use only. * obj_filter_list - a list of object filters. When provided, * gather_database_stats will only gather statistics on the objects which * satisfy at least one of the object filters as needed. * In one single object filter, we can specify the constraints on the * object attributes. The attribute values specified in the object filter * are case-insensitive unless double-quoted. Wildcard is allowed in the * attribute values. Suppose non-null values s1, s2, ... are specified for * attributes a1, a2, ... in one object filter. An object o is said to * satisfy this object filter if (o.a1 like s1) and (o.a2 like s2) and ... * is true. The following example specifies that any table with a "SALES" * prefix in the SH schema and any table in the SYS schema, if stale, will * be gathered. Note that the statistics for the partitions of the tables * also will be gathered if they are stale. * Example: * declare * filter_lst dbms_stats.objecttab := dbms_stats.objecttab(); * begin * filter_lst.extend(2); * filter_lst(1).ownname := 'sh'; * filter_lst(1).objname := 'sales%'; * filter_lst(2).ownname := 'sys'; * dbms_stats.gather_schema_stats(null, obj_filter_list => filter_lst, * options => 'gather_stale'); * end; * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Bad input value * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_gather_database_stats(CAST(NULL AS number), CAST(NULL AS bool), * CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS text), CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param estimate_percent `number`, входное значение, по умолчанию 101 (source CSV / package constant DEFAULT_ESTIMATE_PERCENT). * @param block_sample `bool`, входное значение, по умолчанию false (source CSV). * @param method_opt `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_METHOD_OPT). * @param degree `number`, входное значение, по умолчанию 32766 (source CSV / package constant DEFAULT_DEGREE_VALUE). * @param granularity `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_GRANULARITY). * @param cascade `bool`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param options `varchar2`, входное значение, по умолчанию GATHER (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param gather_sys `bool`, входное значение, по умолчанию true (source CSV). * @param no_invalidate `bool`, входное значение. * @param gather_temp `bool`, входное значение, по умолчанию false (source CSV). * @param gather_fixed `bool`, входное значение, по умолчанию false (source CSV). * @param stattype `varchar2`, входное значение, по умолчанию DATA (source CSV). * @param obj_filter_list `text`, входное значение, по умолчанию NULL (source CSV). * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_gather_database_stats(PG_FUNCTION_ARGS); /** * @brief Gather statistics for dictionary schemas 'SYS', 'SYSTEM' and schemas of * @details RDBMS components. * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * comp_id - component id of the schema to analyze (NULL means schemas * of all RDBMS components). * Please refer to comp_id column of dba_registry view. * The procedure always gather stats on 'SYS' and 'SYSTEM' schemas * regardless of this argument. * 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. This is the default. * The default value can be changed using set_param procedure. * 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 * method_opt := FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause] * size_clause := SIZE [integer | auto | skewonly | repeat], * where integer is between 1 and 2048 * default is FOR ALL COLUMNS SIZE AUTO. * The default value can be changed using set_param procedure. * This value will be passed to all of the individual tables. * degree - degree of parallelism (NULL means use table default value which * is 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. * default for degree is NULL. * The default value can be changed using set_param procedure. * granularity - the granularity of statistics to collect (only pertinent * if the table is partitioned) * 'AUTO' - the procedure determines what level of statistics to collect * 'GLOBAL AND PARTITION' - 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 * default for granularity is AUTO. * The default value can be changed using set_param procedure. * cascade - gather statistics on the indexes as well. * Use the constant DBMS_STATS.AUTO_CASCADE to have Oracle determine * whether index stats to be collected or not. This is the default. * The default value can be changed using set_param procedure. * Using this option is equivalent to running the gather_index_stats * procedure on each of the indexes in the schema in addition to * gathering table and column statistics. * stattab - The user stat table identifier describing where to save * the current statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * options - further specification of which objects to gather statistics for * 'GATHER' - gather statistics on all objects in the schema * 'GATHER AUTO' - gather all necessary statistics automatically. Oracle * implicitly determines which objects need new statistics, and * determines how to gather those statistics. When 'GATHER AUTO' is * specified, the only additional valid parameters are no_invalidate, * comp_id, stattab, * statid and statown; all other parameter settings will be * ignored. Also, return a list of objects processed. * 'GATHER STALE' - gather statistics on stale objects as determined * by looking at the *_tab_modifications views. Also, return * a list of objects found to be stale. * 'GATHER EMPTY' - gather statistics on objects which currently * have no statistics. also, return a list of objects found * to have no statistics. * 'LIST AUTO' - return list of objects to be processed with 'GATHER AUTO' * 'LIST STALE' - return list of stale objects as determined * by looking at the *_tab_modifications views * 'LIST EMPTY' - return list of objects which currently * have no statistics * objlist - list of objects found to be stale or empty * statown - The schema containing stattab (if different from current schema) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * When 'cascade' option is specified, not pertinent with certain types * of indexes described in the gather_index_stats section. * obj_filter_list - a list of object filters. When provided, * gather_dictionary_stats will only gather statistics on the objects which * satisfy at least one of the object filters as needed. Please refer to * obj_filter_list in gather_database_stats * Exceptions: * ORA-20000: Schema does not exist or insufficient privileges * ORA-20001: Bad input value * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_gather_dictionary_stats(CAST(NULL AS varchar2), CAST(NULL AS * number), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), * CAST(NULL AS text), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param comp_id `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param estimate_percent `number`, входное значение, по умолчанию 101 (source CSV / package constant DEFAULT_ESTIMATE_PERCENT). * @param block_sample `bool`, входное значение, по умолчанию false (source CSV). * @param method_opt `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_METHOD_OPT). * @param degree `number`, входное значение, по умолчанию 32766 (source CSV / package constant DEFAULT_DEGREE_VALUE). * @param granularity `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_GRANULARITY). * @param cascade `bool`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param options `varchar2`, входное значение, по умолчанию GATHER AUTO (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию DATA (source CSV). * @param obj_filter_list `text`, входное значение, по умолчанию NULL (source CSV). * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_gather_dictionary_stats(PG_FUNCTION_ARGS); /** * @brief Gather statistics for fixed tables. * @details To run this procedure, you must have the SYSDBA or ANALYZE ANY DICTIONARY * system privilege. * Input arguments: * 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. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * Exceptions: * ORA-20000: insufficient privileges * ORA-20001: Bad input value * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_gather_fixed_obj_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL * AS varchar2)); * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_gather_fixed_obj_stats(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details ownname - schema to analyze (NULL means current schema) * 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. This is the default. * The default value can be changed using set_param procedure. * 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 * method_opt := FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause] * size_clause := SIZE [integer | auto | skewonly | repeat], * where integer is between 1 and 2048 * default is FOR ALL COLUMNS SIZE AUTO. * The default value can be changed using set_param procedure. * This value will be passed to all of the individual tables. * degree - degree of parallelism (NULL means use table default value which * is 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. * default for degree is NULL. * The default value can be changed using set_param procedure. * granularity - the granularity of statistics to collect (only pertinent * if the table is partitioned) * 'AUTO' - the procedure determines what level of statistics to collect * 'GLOBAL AND PARTITION' - 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 * default for granularity is AUTO. * The default value can be changed using set_param procedure. * cascade - gather statistics on the indexes as well. * Use the constant DBMS_STATS.AUTO_CASCADE to have Oracle determine * whether index stats to be collected or not. This is the default. * The default value can be changed using set_param procedure. * Using this option is equivalent to running the gather_index_stats * procedure on each of the indexes in the schema in addition to * gathering table and column statistics. * stattab - The user stat table identifier describing where to save * the current statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * options - further specification of which objects to gather statistics for * 'GATHER' - gather statistics on all objects in the schema * 'GATHER AUTO' - gather all necessary statistics automatically. Oracle * implicitly determines which objects need new statistics, and * determines how to gather those statistics. When 'GATHER AUTO' is * specified, the only additional valid parameters are no_invalidate, * ownname, stattab, * statid, objlist and statown; all other parameter settings will be * ignored. Also, return a list of objects processed. * 'GATHER STALE' - gather statistics on stale objects as determined * by looking at the *_tab_modifications views. Also, return * a list of objects found to be stale. * 'GATHER EMPTY' - gather statistics on objects which currently * have no statistics. also, return a list of objects found * to have no statistics. * 'LIST AUTO' - return list of objects to be processed with 'GATHER AUTO' * 'LIST STALE' - return list of stale objects as determined * by looking at the *_tab_modifications views * 'LIST EMPTY' - return list of objects which currently * have no statistics * objlist - list of objects found to be stale or empty * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * When 'cascade' option is specified, not pertinent with certain types * of indexes described in the gather_index_stats section. * gather_temp - gather stats on global temporary tables also. The * temporary table must be created with "on commit preserve rows" clause, * and the statistics being collected are based on the data in the session * which this procedure is run but shared across all the sessions. * gather_fixed - Gather statistics on fixed tables also. * Statistics for fixed tables can be collected only by user SYS. * Also the ownname should be SYS or NULL. * Specified values for the following arguments will be ignored while * gathering statistics for fixed tables. * estimate_percent, block_sample, stattab, statid, statown * It will not invalidate the dependent cursors on fixed table * on which stats is collected. * This option is meant for internal use only. * force - gather statistics of objects even if they are locked. * obj_filter_list - a list of object filters. When provided, * gather_schema_stats will only gather statistics on the objects which * satisfy at least one object filter in the list as needed. Please refer * to obj_filter_list in gather_database_stats. * Exceptions: * ORA-20000: Schema does not exist or insufficient privileges * ORA-20001: Bad input value * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_gather_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS * number), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL * AS bool), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS text), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param estimate_percent `number`, входное значение, по умолчанию 101 (source CSV / package constant DEFAULT_ESTIMATE_PERCENT). * @param block_sample `bool`, входное значение, по умолчанию false (source CSV). * @param method_opt `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_METHOD_OPT). * @param degree `number`, входное значение, по умолчанию 32766 (source CSV / package constant DEFAULT_DEGREE_VALUE). * @param granularity `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_GRANULARITY). * @param cascade `bool`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param options `varchar2`, входное значение, по умолчанию GATHER (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param gather_temp `bool`, входное значение, по умолчанию false (source CSV). * @param gather_fixed `bool`, входное значение, по умолчанию false (source CSV). * @param stattype `varchar2`, входное значение, по умолчанию DATA (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param obj_filter_list `text`, входное значение, по умолчанию NULL (source CSV). * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_gather_schema_stats(PG_FUNCTION_ARGS); /** * @brief This procedure gathers table and column (and index) statistics. * @details 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. This is the default. * The default value can be changed using set_param procedure. * 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 * method_opt := FOR ALL [INDEXED | HIDDEN] COLUMNS [size_clause] * FOR COLUMNS [size_clause] * column|attribute [size_clause] * [,column|attribute [size_clause] ... ] * size_clause := SIZE [integer | auto | skewonly | repeat], * where integer is between 1 and 2048 * column := column name | extension name | extension * default is FOR ALL COLUMNS SIZE AUTO. * The default value can be changed using set_param procedure. * Optimizer related table statistics are always gathered. * If an extension is provided, the procedure create the extension if it * does not exist already. Please refer to create_extended_stats for * description of extension. * 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. * default for degree is NULL. * The default value can be changed using set_param procedure. * granularity - the granularity of statistics to collect (only pertinent * if the table is partitioned) * 'AUTO' - the procedure determines what level of statistics to collect * 'GLOBAL AND PARTITION' - gather global- and partition-level statistics * 'APPROX_GLOBAL AND PARTITION' - This option is similar to * 'GLOBAL AND PARTITION'. But the global statistics are aggregated * from partition level statistics. It will aggregate all statistics * except number of distinct values for columns and number of distinct * keys of indexes. The existing histograms of the columns at the * table level are also aggregated. The global statistics are gathered * (i.e., going back to GLOBAL AND PARTITION behaviour) * if partname argument is null. The aggregation will use only * partitions with statistics, so to get accurate global statistics, * user has to make sure to have statistics for all partitions. * This option is useful when you collect statistics for a new * partition added into a range partitioned table (for example, a table * partitioned by month). The new data in the partition makes the * global statistics stale (especially the min/max values of the * partitioning column). This stale global statistics may cause * suboptimal plans. In this scenario, users can collect statistics * for the newly added partition with 'APPROX_GLOBAL AND PARTITION' * option so that the global statistics will reflect the newly added * range. This option will take less time than 'GLOBAL AND PARTITION' * option since the global statistics are aggregated from underlying * partition level statistics. Note that, if you are using * APPROX_GLOBAL AND PARTITION, you still need to collect global * statistics (with granularity = 'GLOBAL' option) when there is * substantial amount of change at the table level. For example you * added 10% more data to the table. This is needed to get the correct * number of distinct values/keys statistic at table level. * 'SUBPARTITION' - gather subpartition-level statistics * 'PARTITION' - gather partition-level statistics * 'GLOBAL' - gather global statistics * 'ALL' - gather all (subpartition, partition, and global) statistics * default for granularity is AUTO. * The default value can be changed using set_param procedure. * cascade - gather statistics on the indexes for this table. * Use the constant DBMS_STATS.AUTO_CASCADE to have Oracle determine * whether index stats to be collected or not. This is the default. * The default value can be changed using set_param procedure. * 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. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * When the 'cascade' argument is specified, not pertinent with certain * types of indexes described in the gather_index_stats section. * force - gather statistics of table even if it is locked. * context - internal use only. * 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 * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_gather_table_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS bool), CAST(NULL * AS varchar2), CAST(NULL AS number), CAST(NULL AS varchar2), CAST(NULL AS bool), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param estimate_percent `number`, входное значение, по умолчанию 101 (source CSV / package constant DEFAULT_ESTIMATE_PERCENT). * @param block_sample `bool`, входное значение, по умолчанию false (source CSV). * @param method_opt `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_METHOD_OPT). * @param degree `number`, входное значение, по умолчанию 32766 (source CSV / package constant DEFAULT_DEGREE_VALUE). * @param granularity `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_GRANULARITY). * @param cascade `bool`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию DATA (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param options `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_OPTIONS). * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_gather_table_stats(PG_FUNCTION_ARGS); /** * @brief ------------------------- report_single_stats_operation --------------------- * @details NAME: * report_single_stats_operation * DESCRIPTION: This procedure generates a report for the provided operation. * PARAMETERS: * opid (IN) internal id of the operation that will be reported. * This information may be obtained from the output of * report_stats_operations or through querying * DBA_OPTSTAT_OPERATIONS view. * detail_level (IN) detail level for the content of the report * BASIC : The report includes: * * operation id * * operation name * * operation target object * * start time * * end time * * completion status (i.e., succeeded, * failed, etc.) * TYPICAL (default): In addition to the information provided at level * BASIC, at this level of detail, the report includes individual * target objects for which statistics are gathered in this * operation. More specifically: * -- operation related details -- * * total number of target objects * * total number of successfully completed * objects * * total number of failed objects * * total number of timedout objects * (applies to only auto stats * gathering) * -- target object related details -- * * owner and name of each target object * * target object type (e.g., table, index, * etc.) * * start time * * end time * * completion status * ALL: In addition to the information provided at level TYPICAL, * at this level of detail, the report includes further * information on each target object as follows: * -- operation related details -- * * job name (if the operation was run in a * job) * * session id * * parameter values * * additional error details if the operation * has failed. * -- target object related details -- * * job name * * batching details * * estimated cost * * rank in the target list * * columns for which histograms were * collected * * list of collected extended stats (if any) * * reason for including the object in the * target list (applies to only auto stats * gathering) * * additional error details if the task has * failed. * format (IN) Report format. Suported formats are TEXT (default), * HTML, XML. * container_id (IN) container (pluggable database) id in a consolidated * database environment. By default it is null. In a * pluggable-database, only operations from the local * database are reported, and in the root database, * operations from all pluggable databases are reported. * NOTES: * Note that some of the fields like estimated cost, batching details, * job_name, etc. for individual tasks are only populated when the * corresponding operation was run with concurrency enabled. * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_single_stats_operation(CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS number)); * @param opid `number`, входное значение. * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @param container_id `number`, входное значение, по умолчанию NULL (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_report_single_stats_operation(PG_FUNCTION_ARGS); /** * @brief ------------------------- report_stats_operations --------------------------- * @details NAME: * report_stats_operations * DESCRIPTION: This procedure reports statistics operations at different * levels of detail with optional filters on the start time of * operations. * PARAMETERS: * detail_level (IN) detail level for the content of the report * BASIC : The report includes: * * operation id * * operation name * * operation target object * * start time * * end time * * completion status (i.e., succeeded, * failed, etc.) * TYPICAL (default): In addition to the information provided at level * BASIC, at this level of detail, the report includes the * following fields: * * total number of target objects * * total number of successfully completed * objects * * total number of failed objects * * total number of timedout objects * (applies to only auto stats * gathering) * ALL: In addition to the information provided at level TYPICAL, * at this level of detail, the report includes the following * details. * * job name (if the operation was run in a * job) * * session id * * parameter values * * additional error details if the operation * has failed. * format (IN) Report format. Suported formats are TEXT (default), * HTML, XML. * latestN (IN) Include in the report only latest N operations * (if null (default), no limit on the number of * operations included in the report). * since (IN) only include only stat operations that started since * this date. when null (default), no lower limit on * start time is applied. * until (IN) only include stat operations that started before this * date when null (default), no upper limit on start time * is applied. * auto_only (IN) TRUE: report only auto stats gathering operations * FALSE: report all operations (default) * container_ids (IN) When provided, the report will include operations only * from the input set of pluggable databases in a * consolidated database environment. By default it is * null. In a pluggable-database, only operations from * the local database are reported, and in the root * database, operations from all pluggable databases are * reported. * NOTES: * Note that the type for container_ids input parameter is * dbms_utility.number_array which is an associative PL/SQL array * collection. Although associative array type allows for more flexible * hash table-like organization of entries, this function treats * container_ids as a regular table collection with the first id located at * index 1 and the last id located at index "container_ids.count" without * any empty array slot left between any two ids. An example for 3 * container ids is provided below. * declare * conid_tab dbms_utility.number_array; * report clob; * begin * conid_tab(1) := 124; * conid_tab(2) := 63; * conid_tab(3) := 98; * report := dbms_stats.report_stats_operations(container_ids => * conid_tab); * end; * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_report_stats_operations(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS number), CAST(NULL AS text), CAST(NULL AS text), CAST(NULL AS * bool), CAST(NULL AS text)); * @param detail_level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @param format `varchar2`, входное значение, по умолчанию TEXT (source CSV). * @param latestn `number`, входное значение, по умолчанию NULL (source CSV). * @param since `text`, входное значение, по умолчанию NULL (source CSV). * @param until `text`, входное значение, по умолчанию NULL (source CSV). * @param auto_only `bool`, входное значение, по умолчанию false (source CSV). * @param container_ids `text`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_report_stats_operations(PG_FUNCTION_ARGS); /** * @brief -------------------------- script_advisor_task ------------------------------ * @details NAME: * script_advisor_task * DESCRIPTION: * Gets the script that implements the recommended actions for the * problems found by the statistics advisor. * PARAMETERS: * task_name: (IN) - name of the advisor task * execution_name: (IN) - A name to qualify and identify an execution. * If not specified, the latest execution of the * given task is used. * dir_name (IN) - Directory path to write the generated script to. * If not specified (NULL), the script will only * be put in the CLOB returned with this function. * If dir_name is specified, the script will be * both returned as a clob as well as a new file * in the given directory. * level (IN) - The level of the script to generate. Possible * values are: * 'ALL' -> ignore the filter and generate script * for all findings * 'TYPICAL' -> generate script according to the * filters in place * RETURNS: * A CLOB that contains the script. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_script_advisor_task(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param execution_name `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param dir_name `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param level `varchar2`, входное значение, по умолчанию TYPICAL (source CSV). * @return `clob` — return_value. */ Datum dbms_stats_script_advisor_task(PG_FUNCTION_ARGS); /** * @brief This function is very similar to the function above but creates statistics * @details extension based on the column group usage recorded by seed_col_usage * procedure. This function returns a report of extensions created. * Parameters: * ownname -- owner name of a table. If null, all schemas in the * database. * tabname -- table name. If null, creates statistics extensions * for all tables of ownname. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_show_extended_stats_name(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param extension `varchar2`, входное значение. * @return `varchar2` — return_value. */ Datum dbms_stats_show_extended_stats_name(PG_FUNCTION_ARGS); /** * @brief This procedure is used to import the statistics preferences of * @details all the tables, excluding the tables owned by Oracle. These * tables can by included by passing TRUE for the add_sys parameter. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * stattab - The user stat table identifier describing from where * to retrieve the statistics. * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab * add_sys - value TRUE will include the Oracle-owned tables * Examples: * dbms_stats.import_database_prefs('MY_STAT_TAB', statown=>'SH'); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_to_no_invalidate_type(CAST(NULL AS varchar2)); * @param no_invalidate `varchar2`, входное значение. * @return `bool` — return_value. */ Datum dbms_stats_to_no_invalidate_type(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_varray_to_clob. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_varray_to_clob(CAST(NULL AS text)); * @param va `text`, входное значение. * @return `clob` — return_value. */ Datum dbms_stats_varray_to_clob(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.CCTX_SIZE. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 30. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_cctx_size() FROM dual; * @return `int4`. */ Datum dbms_stats_cctx_size(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.AUTO_SAMPLE_SIZE. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 0. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_auto_sample_size() FROM dual; * @return `int4`. */ Datum dbms_stats_auto_sample_size(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_DEGREE. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 32767. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_default_degree() FROM dual; * @return `int4`. */ Datum dbms_stats_default_degree(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.AUTO_DEGREE. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 32768. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_auto_degree() FROM dual; * @return `int4`. */ Datum dbms_stats_auto_degree(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.AUTO_TABLE_CACHED_BLOCKS. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 0. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_auto_table_cached_blocks() FROM dual; * @return `int4`. */ Datum dbms_stats_auto_table_cached_blocks(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_DEGREE_VALUE. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 32766. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_default_degree_value() FROM dual; * @return `int4`. */ Datum dbms_stats_default_degree_value(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_ESTIMATE_PERCENT. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 101. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_default_estimate_percent() FROM dual; * @return `int4`. */ Datum dbms_stats_default_estimate_percent(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_METHOD_OPT. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'Z'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_method_opt() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_method_opt(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_GRANULARITY. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'Z'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_granularity() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_granularity(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_PUBLISH. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: true. * Причина промоушена: явная булева константа. * Примеры: * SELECT dbms_stats_default_publish() FROM dual; * @return `bool`. */ Datum dbms_stats_default_publish(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_INCREMENTAL. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: false. * Причина промоушена: явная булева константа. * Примеры: * SELECT dbms_stats_default_incremental() FROM dual; * @return `bool`. */ Datum dbms_stats_default_incremental(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_STALE_PERCENT. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 10. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_default_stale_percent() FROM dual; * @return `int4`. */ Datum dbms_stats_default_stale_percent(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_AUTOSTATS_TARGET. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'Z'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_autostats_target() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_autostats_target(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_STAT_CATEGORY. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'Z'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_stat_category() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_stat_category(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_DEL_STAT_CATEGORY. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'OBJECT_STATS, SYNOPSES, REALTIME_STATS, MODELS'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_del_stat_category() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_del_stat_category(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_OPTIONS. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'Z'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_options() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_options(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_ROOT_TRIGGER_PDB. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: false. * Причина промоушена: явная булева константа. * Примеры: * SELECT dbms_stats_default_root_trigger_pdb() FROM dual; * @return `bool`. */ Datum dbms_stats_default_root_trigger_pdb(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_COORD_TRIGGER_SHARD. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: false. * Причина промоушена: явная булева константа. * Примеры: * SELECT dbms_stats_default_coord_trigger_shard() FROM dual; * @return `bool`. */ Datum dbms_stats_default_coord_trigger_shard(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.ADD_GLOBAL_PREFS. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 1. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_add_global_prefs() FROM dual; * @return `int4`. */ Datum dbms_stats_add_global_prefs(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_AUTO_TASK_STATUS. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 'OFF'. * Причина промоушена: явная строковая константа. * Примеры: * SELECT dbms_stats_default_auto_task_status() FROM dual; * @return `varchar2`. */ Datum dbms_stats_default_auto_task_status(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_AUTO_TASK_MAX_RUN_TIME. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 3600. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_default_auto_task_max_run_time() FROM dual; * @return `int4`. */ Datum dbms_stats_default_auto_task_max_run_time(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_AUTO_TASK_INTERVAL. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 900. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_default_auto_task_interval() FROM dual; * @return `int4`. */ Datum dbms_stats_default_auto_task_interval(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DEFAULT_AUTO_ADVISOR_TASK. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: true. * Причина промоушена: явная булева константа. * Примеры: * SELECT dbms_stats_default_auto_advisor_task() FROM dual; * @return `bool`. */ Datum dbms_stats_default_auto_advisor_task(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.DP_OPTIONS_FULL. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: ADD_GLOBAL_PREFS. * Alias/compatibility value указывает на ADD_GLOBAL_PREFS. * Причина промоушена: простой alias к ADD_GLOBAL_PREFS. * Примеры: * SELECT dbms_stats_dp_options_full() FROM dual; * @return `int4`. */ Datum dbms_stats_dp_options_full(PG_FUNCTION_ARGS); /** * @brief Возвращает значение константы DBMS_STATS.UPDATE_GLOBAL_STATS. * @details Это промоутированная package-константа, экспортированная как zero-arg SQL function. * Исходное значение: 8. * Причина промоушена: явная числовая константа. * Примеры: * SELECT dbms_stats_update_global_stats() FROM dual; * @return `int4`. */ Datum dbms_stats_update_global_stats(PG_FUNCTION_ARGS); /** * @brief Возвращает версию RUDB пакета DBMS_STATS. * @details Version: 1.0.0. * Это синтетическая zero-arg SQL function, которую генератор добавляет в каждый новый * пакет. * Примеры: * SELECT dbms_stats_get_version(); * @return `text` — return_value. */ Datum dbms_stats_get_version(PG_FUNCTION_ARGS); /** * @brief Generated mock stub для DBMS_STATS.MOCK. * @details Это checkpoint-заглушка пакета, а не реализованная service function. * Генератор создаёт только контракт и каркас; поведение должно быть реализовано вручную. * Примеры: * SELECT dbms_stats_mock(); * @return `text` — return_value. */ Datum dbms_stats_mock(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_alter_database_tab_monitoring. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_alter_database_tab_monitoring(CAST(NULL AS bool), CAST(NULL AS bool)); * @param monitoring `bool`, входное значение, по умолчанию true (source CSV). * @param sysobjs `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_alter_database_tab_monitoring(PG_FUNCTION_ARGS); /** * @brief Flush in-memory monitoring information for all the tables to the dictionary. * @details Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_alter_schema_tab_monitoring(CAST(NULL AS varchar2), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param monitoring `bool`, входное значение, по умолчанию true (source CSV). */ Datum dbms_stats_alter_schema_tab_monitoring(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to purge old versions of statistics * @details saved in dictionary * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * before_timestamp - versions of statistics saved before this timestamp * will be purged. if null, it uses the purging policy * used by automatic purge. The automatic purge deletes all * history older than * min(current time - stats history retention, * time of recent analyze in the system - 1). * stats history retention value can be changed using * alter_stats_history_retention procedure. * The default is 31 days. * When before_timestamp is specified as DBMS_STATS.PURGE_ALL, all stats * history tables are truncated. Please note that interrupting * (e.g., hitting Ctrl-C) purge_stats while it is running with PURGE_ALL * option may lead to inconsistencies. Hence, please avoid interrupting * purge_stats manually. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_alter_stats_history_retention(CAST(NULL AS number)); * @param retention `number`, входное значение. */ Datum dbms_stats_alter_stats_history_retention(PG_FUNCTION_ARGS); /** * @brief ------------------------- cancel_advisor_task ------------------------------- * @details NAME: * cancel_advisor_task * DESCRIPTION: * Cancels a statistics advisor task execution. All intermediate results * of the current execution will be removed from the task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_cancel_advisor_task(CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. */ Datum dbms_stats_cancel_advisor_task(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_cleanup_stats_job_proc. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_cleanup_stats_job_proc(CAST(NULL AS number), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS number)); * @param ctx `number`, входное значение. * @param job_owner `varchar2`, входное значение. * @param job_name `varchar2`, входное значение. * @param sesid `number`, входное значение. * @param sesser `number`, входное значение. */ Datum dbms_stats_cleanup_stats_job_proc(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_value. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT * FROM dbms_stats_convert_raw_value(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `record`: resval_varchar2 `varchar2` (может быть NULL для source overloads, где поля нет), * resval_date `date` (может быть NULL для source overloads, где поля нет), resval_number * `number` (может быть NULL для source overloads, где поля нет), resval_binary_float * `binary_float` (может быть NULL для source overloads, где поля нет), * resval_binary_double `binary_double` (может быть NULL для source overloads, где поля * нет) */ Datum dbms_stats_convert_raw_value(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_value_nvarchar. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_value_nvarchar(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `nvarchar2` — resval. */ Datum dbms_stats_convert_raw_value_nvarchar(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_convert_raw_value_rowid. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_convert_raw_value_rowid(CAST(NULL AS raw)); * @param rawval `raw`, входное значение. * @return `rowid` — resval. */ Datum dbms_stats_convert_raw_value_rowid(PG_FUNCTION_ARGS); /** * @brief This function returns oldest timestamp where stats history * @details is available. * Users can not restore stats to timestamp older than this one. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_copy_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS * number), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param srcpartname `varchar2`, входное значение. * @param dstpartname `varchar2`, входное значение. * @param scale_factor `number`, входное значение, по умолчанию 1 (source CSV). * @param flags `number`, входное значение, по умолчанию 0 (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_copy_table_stats(PG_FUNCTION_ARGS); /** * @brief Deletes statistics for an entire database * @details Input arguments: * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly in the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab. * If stattab is not null and statown is null, it is assumed that * every schema in the database contains a user statistics table * with the name stattab. * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * stattype - The type of statistics to be deleted * ALL - both data and cache statistics will be deleted * CACHE - only cache statistics will be deleted * force - Ignores the statistics lock on objects and delete * the statistics if set to TRUE. * stat_category - what statistics to delete. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. The default is 'OBJECT_STATS, SYNOPSES' * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * This set of procedures enable the transferrance of statistics * from the dictionary to a user stat table (export_*) and from a user * stat table to the dictionary (import_*). * The procedures are: * create_stat_table * drop_stat_table * upgrade_stat_table * export_column_stats * export_index_stats * export_table_stats * export_schema_stats * export_database_stats * export_system_stats * export_fixed_objects_stats * export_dictionary_stats * import_column_stats * import_index_stats * import_table_stats * import_schema_stats * import_database_stats * import_system_stats * import_fixed_objects_stats * import_dictionary_stats * Notes: * We do not support export/import of stats across databases of * different character sets. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_create_stat_table(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param tblspace `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param global_temporary `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_create_stat_table(PG_FUNCTION_ARGS); /** * @brief Gets all table-related information * @details Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * partname - The name of the table partition from which to get * the statistics. If the table is partitioned and partname * is null, the statistics will be retrieved from the global table * level. * stattab - The user stat table identifier describing from where * to retrieve the statistics. If stattab is null, the statistics * will be retrieved directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different then ownname) * realtime_stats - Whether to combine with real-time table stats * Output arguments: * numrows - Number of rows in the table (partition) * numblks - Number of blocks the table (partition) occupies * avgrlen - Average row length for the table (partition) * im_imcu_count - Number of IMCUs for inmemory table * im_block_count - Number of inmemory blocks for inmemory table * scanrate - Scan rate of the table * Exceptions: * ORA-20000: Object does not exist or insufficient privileges or * no statistics have been stored for requested object * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_column_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS * bool), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param colname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param cascade_parts `bool`, входное значение, по умолчанию true (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param col_stat_type `varchar2`, входное значение, по умолчанию ALL (source CSV). */ Datum dbms_stats_delete_column_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to set the statistics preferences of all * @details the tables, excluding the tables owned by Oracle. These tables * can by included by passing TRUE for the add_sys parameter. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * pname - preference name * The default value for following preferences can be set. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * pvalue - preference value. * if null is specified, it will set the oracle default value. * add_sys - value TRUE will include the Oracle-owned tables * Notes: * All arguments are of type varchar2 and values are enclosed in quotes, * even when they represent numbers. * Examples: * dbms_stats.set_database_prefs('CASCADE', 'DBMS_STATS.AUTO_CASCADE'); * dbms_stats.set_database_prefs('ESTIMATE_PERCENT','9'); * dbms_stats.set_database_prefs('DEGREE','99'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_database_prefs(CAST(NULL AS varchar2), CAST(NULL AS bool)); * @param pname `varchar2`, входное значение. * @param add_sys `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_delete_database_prefs(PG_FUNCTION_ARGS); /** * @brief Deletes statistics for a schema * @details Input arguments: * ownname - The name of the schema * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly in the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * stattype - The type of statistics to be deleted * ALL - both data and cache statistics will be deleted * CACHE - only cache statistics will be deleted * force - Ignores the statistics lock on objects and delete * the statistics if set to TRUE. * stat_category - what statistics to delete. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. The default is 'OBJECT_STATS, SYNOPSES' * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_database_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS bool), * CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию OBJECT_STATS, SYNOPSES, REALTIME_STATS, MODELS (source CSV / package constant DEFAULT_DEL_STAT_CATEGORY). */ Datum dbms_stats_delete_database_stats(PG_FUNCTION_ARGS); /** * @brief This procedure runs gather_dictionary_stats in reporting mode. That is, * @details stats are not actually collected, but all the objects that will be * affected when gather_dictionary_stats is invoked are reported. * The detail level for the report is defined by the detail_level * input parameter. Please see the comments for report_single_stats_operation * on possible values for detail_level and format. * For all other input parameters, please see the comments on * gather_dictionary_stats. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_dictionary_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS bool), * CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию OBJECT_STATS, SYNOPSES, REALTIME_STATS, MODELS (source CSV / package constant DEFAULT_DEL_STAT_CATEGORY). */ Datum dbms_stats_delete_dictionary_stats(PG_FUNCTION_ARGS); /** * @brief This procedure runs gather_fixed_objects_stats in reporting mode. That is, * @details stats are not actually collected, but all the objects that will be * affected when gather_fixed_objects_stats is invoked are reported. * The detail level for the report is defined by the detail_level * input parameter. Please see the comments for report_single_stats_operation * on possible values for detail_level and format. * For all other input parameters, please see the comments on * gather_fixed_objects_stats. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_fixed_objects_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool)); * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_delete_fixed_objects_stats(PG_FUNCTION_ARGS); /** * @brief Deletes column-related statistics * @details Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * colname - The name of the column or extension * partname - The name of the table partition for which to delete * the statistics. If the table is partitioned and partname * is null, global column statistics will be deleted. * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * cascade_parts - If the table is partitioned and partname is null, * setting this to true will cause the deletion of statistics for * this column for all underlying partitions as well. * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - delete statistics even if it is locked * col_stat_type - Type of column statitistics to be deleted. * This argument takes the following values: * 'HISTOGRAM' - delete column histogram only * 'ALL' - delete base column stats and histogram * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS * bool)); * @param ownname `varchar2`, входное значение. * @param indname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param cascade_parts `bool`, входное значение, по умолчанию true (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_delete_index_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to export the statistics gathered and stored * @details as pending. * Stats of any table that is protected in DV from the user will NOT be * exported * If the parameter TABNAME is null then export applies to all tables * of the specified schema. * The default owner/schema is the user who runs the procedure. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * ownname - owner name * tabname - table name * stattab - statistics table name where to export the statistics * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different from ownname) * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.export_pending_stats(null, null, 'MY_STAT_TAB'); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_pending_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param tabname `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_delete_pending_stats(PG_FUNCTION_ARGS); /** * @brief Ths procedure is used to export the system statistics that has been * @details gathered and stored as pending to the specified table. * To run this procedure, you need to have the gather_system_statistics role. * Input arguments: * stattab - statistics table name where to export the statistics. Stattab * cannot be null. * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab. If null, then it defaults to * the current user * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.export_pending_system_stats('MY_STAT_TAB', null, null); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_pending_system_stats(); */ Datum dbms_stats_delete_pending_system_stats(PG_FUNCTION_ARGS); /** * @brief ----------------------------------------------------------------------- * @details procedure delete_processing_rate * ----------------------------------------------------------------------- * deletes the processing rate of a given stat source. If the source is not * specified, then it deletes the statistics of all the sources * Input arguments: * stat_source - the source of processing rates can be 'MANUAL' or * 'CALIBRATION' * Output arguments: None * Privileges: The user issuing should have the role optimizer_processing_rate * or dba * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_processing_rate(CAST(NULL AS varchar2)); * @param stat_source `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_delete_processing_rate(PG_FUNCTION_ARGS); /** * @brief This procedure is used to set the statistics preferences of all * @details the tables owned by the specified owner name. * To run this procedure, you need to connect as owner, have the SYSDBA * privilege, OR have the ANALYZE ANY system privilege * Input arguments: * ownname - owner name * pname - preference name * The default value for following preferences can be set. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * pvalue - preference value. * if null is specified, it will set the oracle default value. * Notes: * All arguments are of type varchar2 and values are enclosed in quotes, * even when they represent numbers * Examples: * dbms_stats.set_schema_prefs('SH', 'CASCADE', * 'DBMS_STATS.AUTO_CASCADE'); * dbms_stats.set_schema_prefs('SH' 'ESTIMATE_PERCENT','9'); * dbms_stats.set_schema_prefs('SH', 'DEGREE','99'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20000: Schema "" does not exist * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_schema_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param pname `varchar2`, входное значение. */ Datum dbms_stats_delete_schema_prefs(PG_FUNCTION_ARGS); /** * @brief Deletes table-related statistics * @details Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * partname - The name of the table partition from which to get * the statistics. If the table is partitioned and partname * is null, the statistics will be retrieved from the global table * level. * stattab - The user stat table identifier describing from where * to retrieve the statistics. If stattab is null, the statistics * will be retrieved directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * cascade_parts - If the table is partitioned and partname is null, * setting this to true will cause the deletion of statistics for * this table for all underlying partitions as well. * cascade_columns - Indicates that delete_column_stats should be * called for all underlying columns (passing the cascade_parts * parameter). * cascade_indexes - Indicates that delete_index_stats should be * called for all underlying indexes (passing the cascade_parts * parameter). * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - delete the statistics even if it is locked * stat_category - what statistics to delete. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. The default is 'OBJECT_STATS, SYNOPSES' * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию OBJECT_STATS, SYNOPSES, REALTIME_STATS, MODELS (source CSV / package constant DEFAULT_DEL_STAT_CATEGORY). */ Datum dbms_stats_delete_schema_stats(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details pname - parameter name to set * pvalue - parameter value to set * stattab - The user stat table identifier describing from where to get * the current statistics info. If stattab is null, the statistics info * will be obtained directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid input value * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20003: Unable to set system statistics * ORA-20004: Parameter doesn't exist * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_system_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_delete_system_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to set the statistics preferences of the * @details specified table in the specified schema. * To run this procedure, you need to connect as owner of the table * or be granted ANALYZE ANY system privilege. * Input arguments: * ownname - owner name * tabname - table name * pname - preference name * The default value for following preferences can be set. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * pvalue - preference value. * if null is specified, it will set the oracle default value. * Notes: * All arguments are of type varchar2 and values are enclosed in quotes, * even when they represent numbers * Examples: * dbms_stats.set_table_prefs('SH', 'SALES', 'CASCADE', * 'DBMS_STATS.AUTO_CASCADE'); * dbms_stats.set_table_prefs('SH', 'SALES', 'ESTIMATE_PERCENT','9'); * dbms_stats.set_table_prefs('SH', 'SALES', 'DEGREE','99'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_table_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param pname `varchar2`, входное значение. */ Datum dbms_stats_delete_table_prefs(PG_FUNCTION_ARGS); /** * @brief Deletes index-related statistics * @details Input arguments: * ownname - The name of the schema * indname - The name of the index * partname - The name of the index partition for which to delete * the statistics. If the index is partitioned and partname * is null, index statistics will be deleted at the global level. * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * cascade_parts - If the index is partitioned and partname is null, * setting this to true will cause the deletion of statistics for * this index for all underlying partitions as well. * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - delete the statistics even if it is locked * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_delete_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS bool), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param cascade_parts `bool`, входное значение, по умолчанию true (source CSV). * @param cascade_columns `bool`, входное значение, по умолчанию true (source CSV). * @param cascade_indexes `bool`, входное значение, по умолчанию true (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию OBJECT_STATS, SYNOPSES, REALTIME_STATS, MODELS (source CSV / package constant DEFAULT_DEL_STAT_CATEGORY). */ Datum dbms_stats_delete_table_stats(PG_FUNCTION_ARGS); /** * @brief ------------------------- drop_advisor_task --------------------------------- * @details NAME: * drop_advisor_task * DESCRIPTION: * drops the statistics advisor task. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_drop_advisor_task(CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. */ Datum dbms_stats_drop_advisor_task(PG_FUNCTION_ARGS); /** * @brief This function returns the name of the statistics entry that is created for * @details the user specified extension. It raises error if no extension is created * yet * Parameters: * ownname -- owner name of a table * tabname -- table name * extension -- can be either a column group or an expression * (see description in create_extended_stats) * Exceptions: * ORA-20000: Insufficient privileges or extension does not exist. * ORA-20001: Error when processing extension * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_drop_extended_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param extension `varchar2`, входное значение. */ Datum dbms_stats_drop_extended_stats(PG_FUNCTION_ARGS); /** * @brief Drops the user statistics table 'stattab' from schema 'ownname' * @details NAME: * drop_stat_table * DESCRIPTION: * Drops a user statistics table created by create_stat_table. * Input arguments: * ownname - The name of the schema (NULL means current schema). * stattab - The user statistics table identifier. * Exceptions: * ORA-20000: Table does not exist or insufficient privileges. * Примеры: * SELECT dbms_stats_drop_stat_table(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. */ Datum dbms_stats_drop_stat_table(PG_FUNCTION_ARGS); /** * @brief The procedure remaps the names of objects in the user stat table. It allows * @details to import the statistics to objects with same definition but with different * names. * Input arguments: * ownname - The owner of the user stat table (NULL means current schema). * stattab - The user stat table identifier. * src_own - Owner of the table to be renamed. This argument can not be null. * src_tab - Name of the table to be renamed. * If null, all tables owned by src_own. * tgt_own - New name of the owner of the table. The owner name is updated * for the dependend objects like columns and indexes as well. Note * that a index of src_tab not owned by src_own is not renamed. * This argument can not be null. * tgt_tab - New name of the table. This argument is valid only if src_tab * is not null. * Examples: * The following statement remap all objects of sh to shsave in user stat * table sh.ustat * dbms_stats.remap_stat_table('sh', 'ustat', 'sh', null, 'shsave', null); * The following statement can be used to import statistics into objects of * shsave once the above remap procedure is completed. * dbms_stats.import_schema_stats('shsave', 'ustat', statown => 'sh'); * The following statement remaps sh.customers ->shsave.customers_sav. * dbms_stats.remap_stat_table('sh', 'ustat', 'sh', 'customers', * 'shsave', 'customers_sav'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid input * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_column_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param colname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_column_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to delete the statistics preferences of * @details all the tables, excluding the tables owned by Oracle. These * tables can by included by passing TRUE for the add_sys parameter. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * pname - preference name * The default value for following preferences can be deleted. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * add_sys - value TRUE will include the Oracle-owned tables * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.delete_database_prefs('CASCADE', false); * dbms_stats.delete_database_prefs('ESTIMATE_PERCENT',true); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_database_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param add_sys `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_export_database_prefs(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for all objects in the schema identified * @details by ownname and stores them in the user stat table identified * by stattab * Stats of any table that is protected in DV from the user will NOT be * exported * Input arguments: * ownname - The name of the schema * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different from ownname) * stat_category - what statistics to export. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be exported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed using statistics * preference. * as_of_timestamp - The timestamp at which the statistics were active * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_database_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). */ Datum dbms_stats_export_database_stats(PG_FUNCTION_ARGS); /** * @brief Deletes statistics for all dictionary schemas ('SYS', 'SYSTEM' and * @details RDBMS component schemas) * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly in the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different from current schema) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * stattype - The type of statistics to be deleted * ALL - both data and cache statistics will be deleted * CACHE - only cache statistics will be deleted * force - Ignores the statistics lock on objects and delete * the statistics if set to TRUE. * stat_category - what statistics to delete. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. The default is 'OBJECT_STATS, SYNOPSES' * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_dictionary_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). */ Datum dbms_stats_export_dictionary_stats(PG_FUNCTION_ARGS); /** * @brief Deletes statistics for fixed tables * @details To run this procedure, you must have the SYSDBA or ANALYZE ANY DICTIONARY * system privilege. * Input arguments: * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly in the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - Ignores the statistics lock on objects and delete * the statistics if set to TRUE. * Exceptions: * ORA-20000: insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_fixed_objects_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_fixed_objects_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for a particular column and stores them in the user * @details stat table identified by stattab * To run this procedure, you need to * 1. connect as owner of the table or be granted ANALYZE ANY system privilege * AND * 2. the table is NOT protected in DV from you. * Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * colname - The name of the column or extension * partname - The name of the table partition. If the table is * partitioned and partname is null, global and partition column * statistics will be exported. * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param ownname `varchar2`, входное значение. * @param indname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_index_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to publish the statistics gathered and stored * @details as pending. * If the parameter TABNAME is null then publish applies to all tables * of the specified schema. * The default owner/schema is the user who runs the procedure. * To run this procedure, you need to have the privilge to collect stats * for the tables that will be touched by this procedure. * Input arguments: * ownname - owner name * tabname - table name * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - to override the lock (TRUE will override the lock). * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.publish_pending_stats('SH', null); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_pending_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param tabname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_pending_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to publish the system statistics which has been * @details gathered and stored as pending. * To run this procedure, you need to have the gather_system_statistics role. * Input argument: * None. * Examples: * dbms_stats.publish_pending_system_stats; * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_pending_system_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_pending_system_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to delete the statistics preferences of all * @details the tables owned by the specified owner name. * To run this procedure, you need to connect as owner, have the SYSDBA * privilege, OR have the ANALYZE ANY system privilege * Input arguments: * ownname - owner name * pname - preference name * The default value for following preferences can be deleted. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.delete_schema_prefs('SH', 'CASCADE'); * dbms_stats.delete_schema_prefs('SH', 'ESTIMATE_PERCENT'); * dbms_stats.delete_schema_prefs('SH', 'DEGREE'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20000: Schema "" does not exist * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_schema_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_schema_prefs(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for a particular table and stores them * @details in the user stat table. * To run this procedure, you need to * 1. connect as owner of the table or be granted ANALYZE ANY system privilege * AND * 2. the table is NOT protected in DV from you. * Cascade will result in all index and column stats associated * with the specified table being exported as well. * Input arguments: * ownname - The name of the schema * tabname - The name of the table * partname - The name of the table partition. If the table is * partitioned and partname is null, global and partition table * statistics will be exported. * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * cascade - If true, column and index statistics for this table * will also be exported. * statown - The schema containing stattab (if different from ownname) * stat_category - what statistics to export. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be exported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed using statistics * preference. * as_of_timestamp - The timestamp at which the statistics were active * Exceptions: * ORA-20000: Object does not exist or insufficient privileges. * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * text)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). * @param as_of_timestamp `text`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_schema_stats(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_export_stats_for_dp. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_stats_for_dp(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS text)); * @param objlist_tab_own `varchar2`, входное значение. * @param objlist_tab `varchar2`, входное значение. * @param dblink `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param options `number`, входное значение, по умолчанию NULL (source CSV). * @param export_stats_since `text`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_stats_for_dp(PG_FUNCTION_ARGS); /** * @brief Retrieves system statistics from the user * @details stat table identified by stattab and stores it in the * dictionary * Input arguments: * stattab - The user stat table identifier describing from where * to retrieve the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * if ORA-20000 shows "no statistics are imported", several * possible reasons are: (1) user specified statid does not * exist; (2) statistics are locked; (3) objects in the * stattab no longer exist in the current database * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20003: Unable to import system statistics * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_system_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_system_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to delete the statistics preferences of the * @details specified table in the specified schema. * To run this procedure, you need to connect as owner of the table * or be granted ANALYZE ANY system privilege. * Input arguments: * ownname - owner name * tabname - table name * pname - preference name * The default value for following preferences can be deleted. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.delete_table_prefs('SH', 'SALES', 'CASCADE'); * dbms_stats.delete_table_prefs('SH', 'SALES', 'DEGREE'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or Illegal input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_export_table_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_export_table_prefs(PG_FUNCTION_ARGS); /** * @brief Exports table, partition, column, and index statistics * @details Stores the current dictionary statistics of the table identified by * ownname/tabname in the existing user statistics table stattab. * The function is the RuDB function counterpart of Oracle's * DBMS_STATS.EXPORT_TABLE_STATS procedure. * * Input arguments: * ownname - schema name; NULL means the first schema in search_path * tabname - table name (required) * partname - partition or subpartition name; NULL exports the global * level plus every partition and subpartition of a partitioned table * stattab - existing statistics table created by * dbms_stats_create_stat_table (required) * statid - optional statistics-set identifier stored in every row * cascade - TRUE exports column and index rows; FALSE exports table * rows only * statown - schema containing stattab; NULL means ownname * stat_category - comma-separated categories; OBJECT_STATS is * supported, SYNOPSES/REALTIME_STATS/MODELS emit NOTICE * as_of_timestamp - must be NULL; non-NULL is rejected because RuDB * does not keep statistics history * * Rows use format version 1: type T for table/partition rows, C for * column rows, and I for index rows. Re-exporting the same scope and * statid replaces the previous rows atomically. * * Exceptions: * ORA-20000-style object/privilege errors * ORA-20002-style bad user statistics table errors * * Example: * SELECT dbms_stats_export_table_stats('public', 't', * NULL, 'stat_tab'); * @param ownname `varchar2`, input; NULL uses the current search path. * @param tabname `varchar2`, input; required. * @param partname `varchar2`, input; default NULL. * @param stattab `varchar2`, input; required existing statistics table. * @param statid `varchar2`, input; default NULL. * @param cascade `bool`, input; default true. * @param statown `varchar2`, input; default NULL (same as ownname). * @param stat_category `varchar2`, input; default * 'OBJECT_STATS, SYNOPSES, REALTIME_STATS'. * @param as_of_timestamp `text`, input; default NULL and must remain NULL. */ Datum dbms_stats_export_table_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the flushing of in-memory monitoring * @details information to the dictionary. Corresponding entries in the * *_tab_modifications views are updated immediately, without waiting * for Oracle to flush it periodically. Useful for the users who need * up-to-date information in those views. * The gather_*_stats procedures internally flush the monitoring information * accordingly, and it is NOT necessary to run this procedure before * gathering the statistics. * The procedure is: * flush_database_monitoring_info * The modification monitoring mechanism is now controlled by the * STATISTICS_LEVEL initialization parameter, and the following * procedures no longer have any effect: * alter_schema_tab_monitoring * alter_database_tab_monitoring * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_flush_database_monitoring_info(); */ Datum dbms_stats_flush_database_monitoring_info(PG_FUNCTION_ARGS); /** * @brief This procedure runs gather_schema_stats in reporting mode. That is, * @details stats are not actually collected, but all the objects that will be * affected when gather_schema_stats is invoked are reported. * The detail level for the report is defined by the detail_level * input parameter. Please see the comments for report_single_stats_operation * on possible values for detail_level and format. * For all other input parameters, please see the comments on * gather_schema_stats. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_gather_database_stats(CAST(NULL AS number), CAST(NULL AS bool), * CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS text)); * @param estimate_percent `number`, входное значение, по умолчанию 101 (source CSV / package constant DEFAULT_ESTIMATE_PERCENT). * @param block_sample `bool`, входное значение, по умолчанию false (source CSV). * @param method_opt `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_METHOD_OPT). * @param degree `number`, входное значение, по умолчанию 32766 (source CSV / package constant DEFAULT_DEGREE_VALUE). * @param granularity `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_GRANULARITY). * @param cascade `bool`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param options `varchar2`, входное значение, по умолчанию GATHER (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param gather_sys `bool`, входное значение, по умолчанию true (source CSV). * @param no_invalidate `bool`, входное значение. * @param gather_temp `bool`, входное значение, по умолчанию false (source CSV). * @param gather_fixed `bool`, входное значение, по умолчанию false (source CSV). * @param stattype `varchar2`, входное значение, по умолчанию DATA (source CSV). * @param obj_filter_list `text`, входное значение, по умолчанию NULL (source CSV). * @return `text` — objlist. */ Datum dbms_stats_gather_database_stats(PG_FUNCTION_ARGS); /** * @brief This procedure runs auto stats gathering job in reporting mode. That is, * @details stats are not actually collected, but all the objects that will be * affected when auto stats gathering is invoked are reported. * The detail level for the report is defined by the detail_level * input parameter. Please see the comments for report_single_stats_operation * on possible values for detail_level and format. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_gather_database_stats_job_proc(); */ Datum dbms_stats_gather_database_stats_job_proc(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for fixed tables from the user stat table and * @details stores them in the dictionary * To run this procedure, you must have the SYSDBA or ANALYZE ANY DICTIONARY * system privilege. * The statistics will be imported as pending in case PUBLISH preference * is set to FALSE. * Input arguments: * stattab - The user stat table identifier describing from where * to retrieve the 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. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - Override statistics lock. * TRUE- Ignores the statistics lock on objects and import * the statistics. * FALSE-The statistics of an object will be imported only if it * is not locked. * Exceptions: * ORA-20000: insufficient privileges * if ORA-20000 shows "no statistics are imported", several * possible reasons are: (1) user specified statid does not * exist; (2) statistics are locked; (3) objects in the * stattab no longer exist in the current database * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_gather_dictionary_stats(CAST(NULL AS varchar2), CAST(NULL AS number), * CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS varchar2), * CAST(NULL AS text)); * @param comp_id `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param estimate_percent `number`, входное значение, по умолчанию 101 (source CSV / package constant DEFAULT_ESTIMATE_PERCENT). * @param block_sample `bool`, входное значение, по умолчанию false (source CSV). * @param method_opt `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_METHOD_OPT). * @param degree `number`, входное значение, по умолчанию 32766 (source CSV / package constant DEFAULT_DEGREE_VALUE). * @param granularity `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_GRANULARITY). * @param cascade `bool`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param options `varchar2`, входное значение, по умолчанию GATHER AUTO (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию DATA (source CSV). * @param obj_filter_list `text`, входное значение, по умолчанию NULL (source CSV). * @return `text` — objlist. */ Datum dbms_stats_gather_dictionary_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves system statistics and stores it * @details in the user stat table identified by stattab * Input arguments: * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20003: Unable to export system statistics * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_gather_fixed_objects_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool)); * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. */ Datum dbms_stats_gather_fixed_objects_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for index * @details Currently this is mostly the ANALYZE wrapper * @param ownname `varchar2`, Schema containing the index. * @param indname `varchar2`, Name of the index. * @param partname `varchar2`, N/A * @param estimate_percent `number`, N/A * @param stattab `varchar2`, N/A * @param statid `varchar2`, N/A * @param statown `varchar2`, N/A * @param degree `number`, N/A * @param granularity `varchar2`, N/A * @param no_invalidate `bool`, N/A * @param force `bool`, N/A * @param vector_index_options `text`, N/A */ Datum dbms_stats_gather_index_stats(PG_FUNCTION_ARGS); /** * @brief ------------------------- gather_processing_rate -------------------------- * @details NAME: * gather_processing_rate - Gather Processing Rates * DESCRIPTION: This procedure starts the job of gathering the processing * rates which end after 'timeLimit' seconds * PARAMETERS: * gathering_mode - Mode can be 'START' and 'END' * duration - time duration (number of minutes) for which the * processing must be gathered. Default value is 60 * minutes. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_gather_processing_rate(CAST(NULL AS varchar2), CAST(NULL AS number)); * @param gathering_mode `varchar2`, входное значение, по умолчанию START (source CSV). * @param duration `number`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_gather_processing_rate(PG_FUNCTION_ARGS); /** * @brief This procedure runs gather_table_stats in reporting mode. * @details Stats are not actually collected, but all the objects that will be * affected when gather_table_stats is invoked are reported. * @param ownname `varchar2`, Schema name. * @param estimate_percent `number`, N/A. * @param block_sample `bool`, N/A. * @param method_opt `varchar2`, N/A. * @param degree `number`, N/A. * @param granularity `varchar2`, N/A. * @param cascade `bool`, N/A. * @param stattab `varchar2`, N/A. * @param statid `varchar2`, N/A. * @param options `varchar2`, N/A. * @param statown `varchar2`, N/A. * @param no_invalidate `bool`, N/A. * @param force `bool`, N/A. * @param obj_filter_list `text`, N/A. * @return `text` — objlist, but currently NULL. */ Datum dbms_stats_gather_schema_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is invoked by the high frequency auto stats collection task * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_gather_st_job_continuous_proc(); */ Datum dbms_stats_gather_st_job_continuous_proc(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_gather_system_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_gather_system_stats(CAST(NULL AS varchar2), CAST(NULL AS number), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param gathering_mode `varchar2`, входное значение, по умолчанию NOWORKLOAD (source CSV). * @param interval `number`, входное значение, по умолчанию 60 (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_gather_system_stats(PG_FUNCTION_ARGS); /** * @brief This function gathers table, column, and index statistics. * @details Currently this is mostly the ANALYZE wrapper * @param ownname `varchar2`, Schema containing the table. * @param tabname `varchar2`, Name of the table. * @param partname `varchar2`, N/A. * @param estimate_percent `number`, N/A. * @param block_sample `bool`, N/A. * @param method_opt `varchar2`, N/A. * @param degree `number`, N/A. * @param granularity `varchar2`, N/A. * @param cascade `bool`, N/A. * @param stattab `varchar2`, N/A. * @param statid `varchar2`, N/A. * @param statown `varchar2`, N/A. * @param no_invalidate `bool`, N/A. * @param stattype `varchar2`, N/A. * @param force `bool`, N/A. * @param context `text`, N/A. * @param options `varchar2`, N/A. */ Datum dbms_stats_gather_table_stats(PG_FUNCTION_ARGS); /** * @brief This procedure generates object statistics from previously collected * @details statistics of related objects. For fully populated * schemas, the gather procedures should be used instead when more * accurate statistics are desired. * The currently supported objects are b-tree and bitmap indexes. * ownname - schema of object * objname - name of object * organized - the amount of ordering associated between the index and * its undelrying table. A heavily organized index would have consecutive * index keys referring to consecutive rows on disk for the table * (the same block). A heavily disorganized index would have consecutive * keys referencing different table blocks on disk. This parameter is * only used for b-tree indexes. * The number can be in the range of 0-10, with 0 representing a completely * organized index and 10 a completely disorganized one. * force - generate statistics even if it is locked * Exceptions: * ORA-20000: Unsupported object type of object does not exist * ORA-20001: Invalid option or invalid statistics * ORA-20005: object statistics are locked * -------------------------- generate_index_stats --------------------------- * NAME: * generate_index_stats * DESCRIPTION: * This procedure generates index stats for all indexes created on the * given owner and table, with given status and index name following * some pattern. * PARAMETERS: * ownname (IN) - table owner * tabname (IN) - table name * index_pattern (IN) - index name pattern * status (IN) - index status * no_stats_index_only (IN) - whether only consider index with no stats * RETURNS: * None. * --------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_generate_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS number)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param index_pattern `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param status `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_stats_index_only `number`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_generate_index_stats(PG_FUNCTION_ARGS); /** * @brief This procedure runs gather_database_stats in reporting mode. That is, * @details stats are not actually collected, but all the objects that will be * affected when gather_database_stats is invoked are reported. * The detail level for the report is defined by the detail_level * input parameter. Please see the comments for report_single_stats_operation * on possible values for detail_level and format. * For all other input parameters, please see the comments on * gather_database_stats. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_generate_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS number), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param objname `varchar2`, входное значение. * @param organized `number`, входное значение, по умолчанию 7 (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_generate_stats(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_gen_selmap. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT * FROM dbms_stats_gen_selmap(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS binary_integer), CAST(NULL * AS text), CAST(NULL AS text), CAST(NULL AS text)); * @param owner `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param pname `varchar2`, входное значение. * @param spname `varchar2`, входное значение. * @param flag `binary_integer`, входное значение. * @param colinfo `text`, входное значение. * @param selmap `text`, входное значение. * @param clist `text`, входное значение. * @return `record`: flag `binary_integer`, selmap `text`, clist `text` */ Datum dbms_stats_gen_selmap(PG_FUNCTION_ARGS); /** * @brief ----------------------- get_advisor_opr_filter ------------------------------ * @details NAME: * get_advisor_opr_filter * DESCRIPTION: * Create an operation filter for a statistics operation * PARAMETERS: * opr_id: (IN) - ID of the statistics operation. This is the ID for * the operation stored in dba_optstat_operations * opr_filter (IN) - Statistics Advisor Filter generated based on * the given statistics operation * NOTE; * The filter can only be specified from either the operation ID or the * filter ID, but not both at the same time. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_get_advisor_opr_filter(CAST(NULL AS number), CAST(NULL AS text)); * @param opr_id `number`, входное значение. * @param opr_filter `text`, входное значение. * @return `text` — opr_filter. */ Datum dbms_stats_get_advisor_opr_filter(PG_FUNCTION_ARGS); /** * @brief Gets column statistics — Oracle overload 1 (statistics version). * @details Input arguments: ownname `varchar2`, tabname `varchar2`, * colname `varchar2`, partname `varchar2` (ignored), * stattab `varchar2` (ignored), statid `varchar2` (ignored), * statown `varchar2` (ignored), realtime_stats `bool` (ignored). * Output arguments: distcnt `number` (pg_statistic.stadistinct, * sign-decoded against reltuples), density `number` * (1 / distcnt, NULL when distcnt is 0), nullcnt `number` * (round(stanullfrac * reltuples)), srec `text` (min/max/histogram * serialization, NULL when no histogram), avgclen `number` * (pg_statistic.stawidth). * @param ownname `varchar2`, имя схемы. * @param tabname `varchar2`, имя таблицы. * @param colname `varchar2`, имя колонки. * @param partname `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param stattab `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param statid `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param statown `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param realtime_stats `bool`, не поддерживается (NOTICE), по умолчанию true. * @return `record`: distcnt `number`, density `number`, nullcnt `number`, * srec `text`, avgclen `number`. */ Datum dbms_stats_get_column_stats_ovr1(PG_FUNCTION_ARGS); /** * @brief Gets column statistics — Oracle overload 2 (user-defined statistics). * @details Input arguments: ownname `varchar2`, tabname `varchar2`, * colname `varchar2`, partname `varchar2` (ignored), * stattab `varchar2` (ignored), statid `varchar2` (ignored), * statown `varchar2` (ignored). * Output arguments: ext_stats `raw` (всегда NULL), stattypown * `varchar2` (всегда NULL), stattypname `varchar2` (всегда NULL) — * в PostgreSQL нет пользовательского типа статистики для колонки. * @param ownname `varchar2`, имя схемы. * @param tabname `varchar2`, имя таблицы. * @param colname `varchar2`, имя колонки. * @param partname `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param stattab `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param statid `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param statown `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @return `record`: ext_stats `raw` (NULL), stattypown `varchar2` (NULL), * stattypname `varchar2` (NULL). */ Datum dbms_stats_get_column_stats_ovr2(PG_FUNCTION_ARGS); /** * @brief Gets all column-related information * @details Retrieves statistics for a particular column and stores them in the user * stat table identified by stattab * To run this procedure, you need to * 1. connect as owner of the table or be granted ANALYZE ANY system privilege * AND * 2. the table is NOT protected in DV from you. * Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * colname - The name of the column or extension * partname - The name of the table partition from which to get * the statistics. If the table is partitioned and partname * is null, the statistics will be retrieved from the global table * level. * stattab - The user stat table identifier describing from where * to retrieve the statistics. If stattab is null, the statistics * will be retrieved directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different then ownname) * realtime_stats - Whether to combine with real-time column stats * Output arguments: * distcnt - The number of distinct values * density - The column density * nullcnt - The number of nulls * srec - structure holding internal representation of column minimum, * maximum, and histogram values * avgclen - The average length of the column (in bytes) * Output arguments for user-defined column statistics: * ext_stats - external (user-defined) statistics * stattypown - owner of statistics type associated with column * stattypname - name of statistics type associated with column * Exceptions: * ORA-20000: Object does not exist or insufficient privileges or * no statistics have been stored for requested object * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT * FROM dbms_stats_get_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param ownname `varchar2`, входное значение. * @param indname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @return `record`: numrows `number` (может быть NULL для source overloads, где поля нет), numlblks `number` * (может быть NULL для source overloads, где поля нет), numdist `number` (может быть NULL * для source overloads, где поля нет), avglblk `number` (может быть NULL для source * overloads, где поля нет), avgdblk `number` (может быть NULL для source overloads, где * поля нет), clstfct `number` (может быть NULL для source overloads, где поля нет), * indlevel `number` (может быть NULL для source overloads, где поля нет), guessq `number` * (может быть NULL для source overloads, где поля нет), cachedblk `number` (может быть * NULL для source overloads, где поля нет), cachehit `number` (может быть NULL для source * overloads, где поля нет), ext_stats `raw` (может быть NULL для source overloads, где * поля нет), stattypown `varchar2` (может быть NULL для source overloads, где поля нет), * stattypname `varchar2` (может быть NULL для source overloads, где поля нет) */ Datum dbms_stats_get_index_stats(PG_FUNCTION_ARGS); /** * @brief This procedure gathers system statistics. * @details Input arguments: * gathering_mode - Values: NOWORKLOAD, INTERVAL, START, STOP, EXADATA * NOWORKLOAD: * In this mode system statistics will be gathered based on system * characteristics only, without regard to the workload. * INTERVAL: * In this mode the user can specify a time interval parameter, in * minutes. * After minutes has passed the system statistics will be * updated either in dictionary, or stattab if specified. The system * statistics are based on system activity during specified interval. * START | STOP: * The procedure is first called with START then followed by another * call using STOP. It is assumed that between these two calls some * SQL workload has been running allowing the procedure to capture * workload-specific statistics. * START will initiate gathering statistics. STOP will calculate * statistics for elapsed period of time (since START) and refresh * dictionary or stattab. Interval in these modes is ignored. * EXADATA: * In this mode the gathered system statistics takes into account the * unique capabilities provided by using Exadata such as large IO size * and high IO throughput. The multi-block read count and IO throughput * statistics are set along with the CPU speed. * interval - Specifies period of time in minutes for gathering statistics * in INTERVAL mode. * 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) * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Bad input value * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20003: Unable to gather system statistics * ORA-20004: Error in "INTERVAL" mode : * system parameter job_queue_processes must be > 0 * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT * FROM dbms_stats_get_system_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param pname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @return `record`: status `varchar2`, dstart `date`, dstop `date`, pvalue `number` */ Datum dbms_stats_get_system_stats(PG_FUNCTION_ARGS); /** * @brief Gets all index-related information * @details Input arguments: * ownname - The name of the schema * indname - The name of the index * partname - The name of the index partition for which to get * the statistics. If the index is partitioned and partname * is null, the statistics will be retrieved for the global index * level. * stattab - The user stat table identifier describing from where * to retrieve the statistics. If stattab is null, the statistics * will be retrieved directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different then ownname) * Output arguments: * numrows - The number of rows in the index (partition) * numlblks - The number of leaf blocks in the index (partition) * numdist - The number of distinct keys in the index (partition) * avglblk - Average integral number of leaf blocks in which each * distinct key appears for this index (partition). * avgdblk - Average integral number of data blocks in the table * pointed to by a distinct key for this index (partition). * clstfct - The clustering factor for the index (partition). * indlevel - The height of the index (partition). * guessq - IOT guess quality of the index (partition). * Output arguments for user defined statistics: * ext_stats - external (user-defined) statistics * stattypown - owner of statistics type associated with index * stattypname - name of statistics type associated with index * Exceptions: * ORA-20000: Object does not exist or insufficient privileges or * no statistics have been stored for requested object * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT * FROM dbms_stats_get_table_stats_ovr1(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param realtime_stats `bool`, входное значение, по умолчанию true (source CSV). * @return `record`: numrows `number`, numblks `number`, avgrlen `number`, im_imcu_count `number` (может быть * NULL для source overloads, где поля нет), im_block_count `number` (может быть NULL для * source overloads, где поля нет), scanrate `number` (может быть NULL для source * overloads, где поля нет), cachedblk `number` (может быть NULL для source overloads, где * поля нет), cachehit `number` (может быть NULL для source overloads, где поля нет) */ /** * @brief Gets table statistics — Oracle overload 1. * @details Input arguments: ownname `varchar2`, tabname `varchar2`, * partname `varchar2` (ignored), stattab `varchar2` (ignored), * statid `varchar2` (ignored), statown `varchar2` (ignored), * realtime_stats `bool` (ignored). * Output arguments: numrows `number` (pg_class.reltuples), * numblks `number` (pg_class.relpages), avgrlen `number` * (relpages * BLCKSZ / reltuples). * @param ownname `varchar2`, имя схемы. * @param tabname `varchar2`, имя таблицы. * @param partname `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param stattab `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param statid `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param statown `varchar2`, не поддерживается (NOTICE), по умолчанию NULL. * @param realtime_stats `bool`, не поддерживается (NOTICE), по умолчанию true. * @return `record`: numrows `number`, numblks `number`, avgrlen `number`. */ Datum dbms_stats_get_table_stats_ovr1(PG_FUNCTION_ARGS); /** * @brief Gets table statistics — Oracle overload 2 (In-Memory metrics). * @details Same inputs as `dbms_stats_get_table_stats_ovr1`. * Output arguments: numrows `number`, numblks `number`, * avgrlen `number`, im_imcu_count `number` (всегда NULL), * im_block_count `number` (всегда NULL), scanrate `number` * (всегда NULL) — в PostgreSQL нет In-Memory column store. * @return `record`: numrows `number`, numblks `number`, avgrlen `number`, * im_imcu_count `number` (NULL), im_block_count `number` (NULL), * scanrate `number` (NULL). */ Datum dbms_stats_get_table_stats_ovr2(PG_FUNCTION_ARGS); /** * @brief Gets table statistics — Oracle overload 3 (cache metrics). * @details Input arguments: ownname `varchar2`, tabname `varchar2`, * partname `varchar2` (ignored), stattab `varchar2` (ignored), * statid `varchar2` (ignored), realtime_stats `bool` (ignored). * Output arguments: numrows `number`, numblks `number`, * avgrlen `number`, cachedblk `number` (всегда NULL), * cachehit `number` (всегда NULL) — внутренние счётчики Oracle. * @return `record`: numrows `number`, numblks `number`, avgrlen `number`, * cachedblk `number` (NULL), cachehit `number` (NULL). */ Datum dbms_stats_get_table_stats_ovr3(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for all objects in the database * @details and stores them in the user stat tables identified * by statown.stattab * Stats of any table that is protected in DV from the user will NOT be * exported * Input arguments: * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab. * If statown is null, it is assumed that every schema in the database * contains a user statistics table with the name stattab. * stat_category - what statistics to export. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be exported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed usig statistics * preference. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_column_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param colname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_import_column_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to export the statistics preferences of * @details all the tables, excluding the tables owned by Oracle. These * tables can by included by passing TRUE for the add_sys parameter. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * stattab - statistics table name where to export the statistics * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab. If null, then it defaults * to the current user * add_sys - value TRUE will include the Oracle-owned tables * Examples: * dbms_stats.export_database_prefs('MY_STAT_TAB', statown=>'SH'); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_database_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param add_sys `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_import_database_prefs(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for all objects in the schema identified * @details by ownname from the user stat table and stores them in the * dictionary * The statistics will be imported as pending in case PUBLISH preference * is set to FALSE. * Input arguments: * ownname - The name of the schema * stattab - The user stat table identifier describing from where * to retrieve the 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. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - Override statistics lock. * TRUE- Ignores the statistics lock on objects and import * the statistics. * FALSE-The statistics of an object will be imported only if it * is not locked. * ie if both DATA and CACHE statistics is locked, it will not * import anything. If CACHE statistics of an object is locked, * only DATA statistics will be imported and vice versa. * stat_category - what statistics to import. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be imported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed usig statistics * preference. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges. * if ORA-20000 shows "no statistics are imported", several * possible reasons are: (1) no statistics exist for the specified * ownname or statid in the stattab; (2) statistics are locked; * (3) objects in the stattab no longer exist in the current * database * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_database_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). */ Datum dbms_stats_import_database_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for all dictionary schemas ('SYS', 'SYSTEM' and * @details RDBMS component schemas) and stores them in the user stat table * identified by stattab * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different from current schema) * stat_category - what statistics to export. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be exported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed usig statistics * preference. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_dictionary_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). */ Datum dbms_stats_import_dictionary_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for fixed tables and stores them in the user * @details stat table identified by stattab * To run this procedure, you must have the SYSDBA or ANALYZE ANY DICTIONARY * system privilege. * Input arguments: * stattab - The user stat table identifier describing where * to store the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Exceptions: * ORA-20000: insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_fixed_objects_stats(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_import_fixed_objects_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for a particular column from the user stat table * @details identified by stattab and stores them in the dictionary * Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * colname - The name of the column or extension * partname - The name of the table partition. If the table is * partitioned and partname is null, global and partition column * statistics will be imported. * stattab - The user stat table identifier describing from where * to retrieve the 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. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - import statistics even if it is locked * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param indname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_import_index_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to export the statistics preferences of all * @details the tables owner by the specified owner name. * To run this procedure, you need to connect as owner, have the SYSDBA * privilege, OR have the ANALYZE ANY system privilege * Input arguments: * ownname - owner name * stattab - statistics table name where to export the statistics * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.export_schema_prefs('SH', 'MY_STAT_TAB'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20000: Schema "" does not exist * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_schema_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_import_schema_prefs(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for a particular table from the user * @details stat table identified by stattab and stores them in the dictionary. * Cascade will result in all index and column stats associated * with the specified table being imported as well. * The statistics will be imported as pending in case PUBLISH preference * is set to FALSE. * Input arguments: * ownname - The name of the schema * tabname - The name of the table * partname - The name of the table partition. If the table is * partitioned and partname is null, global and partition table * statistics will be imported. * stattab - The user stat table identifier describing from where * to retrieve the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * cascade - If true, column and index statistics for this table * will also be imported. * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - import even if statistics of the object is locked * stat_category - what statistics to import. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be imported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed usig statistics * preference. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). */ Datum dbms_stats_import_schema_stats(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_import_stats_for_dp. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_stats_for_dp(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS number)); * @param objlist_tab_own `varchar2`, входное значение. * @param objlist_tab `varchar2`, входное значение. * @param options `number`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_import_stats_for_dp(PG_FUNCTION_ARGS); /** * @brief Deletes system statistics * @details Input arguments: * stattab - The user stat table identifier describing from where * to delete the statistics. If stattab is null, the statistics * will be deleted directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * statown - The schema containing stattab (if different then ownname) * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_system_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_import_system_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to export the statistics preferences of the * @details specified table in the specified schema into the specified statistics * table. * To run this procedure, you need to connect as owner of the table * or be granted ANALYZE ANY system privilege. * Input arguments: * ownname - owner name * tabname - table name * stattab - statistics table name where to export the statistics * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.export_table_prefs('SH', 'SALES', 'MY_STAT_TAB'); * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_table_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_import_table_prefs(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for a particular index from the user * @details stat table identified by stattab and stores them in the * dictionary * Input arguments: * ownname - The name of the schema * indname - The name of the index * partname - The name of the index partition. If the index is * partitioned and partname is null, global and partition index * statistics will be imported. * stattab - The user stat table identifier describing from where * to retrieve the 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. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - import the statistics even if it is locked * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_import_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * bool), CAST(NULL AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS * varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение. * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param cascade `bool`, входное значение, по умолчанию true (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param stat_category `varchar2`, входное значение, по умолчанию Z (source CSV / package constant DEFAULT_STAT_CATEGORY). */ Datum dbms_stats_import_table_stats(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_init_package. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_init_package(); */ Datum dbms_stats_init_package(PG_FUNCTION_ARGS); /** * @brief ------------------------- interrupt_advisor_task ---------------------------- * @details NAME: * interrupt_advisor_task * DESCRIPTION: * interrupts a currently executing statistics advisor task. The task will * end its operations as it would at a normal exit and the user will be able * to access intermediate results. The task may also later be resumed. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_interrupt_advisor_task(CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. */ Datum dbms_stats_interrupt_advisor_task(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to lock the statistics on the table * @details Input arguments: * ownname - schema of table to lock * tabname - name of the table * stattype - type of statistics to be locked * 'CACHE' - lock only caching statistics * 'DATA' - lock only data statistics * 'ALL' - lock both data and caching statistics. This is the default * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_lock_partition_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение. */ Datum dbms_stats_lock_partition_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to lock statistics for a partition * @details Input arguments: * ownname - schema of the table to lock * tabname - name of the table * partname - name of the partition * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_lock_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). */ Datum dbms_stats_lock_schema_stats(PG_FUNCTION_ARGS); /** * @brief Retrieves statistics for all dictionary schemas ('SYS', 'SYSTEM' and * @details RDBMS component schemas) from the user stat table and stores them in * the dictionary * The statistics will be imported as pending in case PUBLISH preference * is set to FALSE. * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * stattab - The user stat table identifier describing from where * to retrieve the statistics. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different from current schema) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - Override statistics lock. * TRUE- Ignores the statistics lock on objects and import * the statistics. * FALSE-The statistics of an object will be imported only if it * is not locked. * ie if both DATA and CACHE statistics is locked, it will not * import anything. If CACHE statistics of an object is locked, * only DATA statistics will be imported and vice versa. * stat_category - what statistics to import. It accepts multiple values * separated by comma. The values we support now are 'OBJECT_STATS' * (i.e., table statistics, column statistics and index statistics) and * 'SYNOPSES'. However SYNOPSES can only be imported along with * OBJECT_STATS. Therefore only valid combinations are * OBJECT_STATS * OBJECT_STATS, SYNOPSES * The default value is OBJECT_STATS that can be changed usig statistics * preference. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * if ORA-20000 shows "no statistics are imported", several * possible reasons are: (1) user specified statid does not * exist; (2) statistics are locked; (3) objects in the * stattab no longer exist in the current database * ORA-20001: Invalid or inconsistent values in the user stat table * ORA-20002: Bad user statistics table, may need to upgrade it * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_lock_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). */ Datum dbms_stats_lock_table_stats(PG_FUNCTION_ARGS); /** * @brief This function drops the statistics entry that is created for the user * @details specified extension. This cancels the effects of created_extended_stats. * If no extension is created for the extension, this function * throws an error. * Parameters: * ownname -- owner name of a table * tabname -- table name * extension -- can be either a column group or an expression * (see description in create_extended_stats) * Exceptions: * ORA-20000: Insufficient privileges or extension does not exist. * ORA-20001: Error when processing extension * The following procedure is for internal use only. * gather_database_stats_job_proc * cleanup_stats_job_proc * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_merge_col_usage(CAST(NULL AS varchar2)); * @param dblink `varchar2`, входное значение. */ Datum dbms_stats_merge_col_usage(PG_FUNCTION_ARGS); /** * @brief internal use only (partition exchange) * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_merge_stats_partition_exchange(CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL AS number)); * @param g_objn `number`, входное значение. * @param g_ownname `varchar2`, входное значение. * @param g_tabname `varchar2`, входное значение. * @param t_objn `number`, входное значение. * @param t_ownname `varchar2`, входное значение. * @param t_tabname `varchar2`, входное значение. * @param p_objn `number`, входное значение. * @param flags `number`, входное значение. */ Datum dbms_stats_merge_stats_partition_exchange(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_postprocess_indstats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_postprocess_indstats(CAST(NULL AS text), CAST(NULL AS number)); * @param istats `text`, входное значение. * @param flags `number`, входное значение. */ Datum dbms_stats_postprocess_indstats(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_postprocess_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_postprocess_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS text), * CAST(NULL AS text), CAST(NULL AS text), CAST(NULL AS text), CAST(NULL AS text), * CAST(NULL AS number)); * @param owner `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param tobjn `number`, входное значение. * @param fobjn `number`, входное значение. * @param flag `number`, входное значение. * @param rawstats `text`, входное значение. * @param selmap `text`, входное значение. * @param clist `text`, входное значение. * @param cht `text`, входное значение. * @param restoretime `text`, входное значение. * @param andv_algo `number`, входное значение. */ Datum dbms_stats_postprocess_stats(PG_FUNCTION_ARGS); /** * @brief This set of procedures enable the storage and retrieval of * @details individual column-, index-, table- and system- related statistics * The procedures are: * prepare_column_values* * set_column_stats * set_index_stats * set_table_stats * set_system_stats * convert_raw_value* * get_column_stats * get_index_stats * get_table_stats * get_system_stats * delete_column_stats * delete_index_stats * delete_table_stats * delete_schema_stats * delete_database_stats * delete_system_stats * delete_fixed_objects_stats * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_prepare_column_values(CAST(NULL AS text), CAST(NULL AS text)); * @param srec `text`, входное значение. * @param charvals `text`, входное значение. * @return `text` — srec. */ Datum dbms_stats_prepare_column_values(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_prepare_column_values_nvarchar. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_prepare_column_values_nvarchar(CAST(NULL AS text), CAST(NULL AS * nvarchar2), CAST(NULL AS nvarchar2)); * @param srec `text`, входное значение. * @param nvmin `nvarchar2`, входное значение. * @param nvmax `nvarchar2`, входное значение. * @return `text` — srec. */ Datum dbms_stats_prepare_column_values_nvarchar(PG_FUNCTION_ARGS); /** * @brief функция dbms_stats_prepare_column_values_rowid. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * SELECT dbms_stats_prepare_column_values_rowid(CAST(NULL AS text), CAST(NULL AS rowid), * CAST(NULL AS rowid)); * @param srec `text`, входное значение. * @param rwmin `rowid`, входное значение. * @param rwmax `rowid`, входное значение. * @return `text` — srec. */ Datum dbms_stats_prepare_column_values_rowid(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_publish_pending_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_publish_pending_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param tabname `varchar2`, входное значение. * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_publish_pending_stats(PG_FUNCTION_ARGS); /** * @brief This procedure is used to delete the pending statistics that have * @details been gathered but not published yet, i.e, stored as pending. * If the parameter TABNAME is null then delete applies to all tables * of the specified schema. * The default owner/schema is the user who runs the procedure. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * ownname - owner name * tabname - table name * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.delete_pending_stats('SH', 'SALES'); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_publish_pending_system_stats(); */ Datum dbms_stats_publish_pending_system_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to restore system statistics * @details as of a specified timestamp (as_of_timestamp). * Input arguments: * as_of_timestamp - statistics as of this timestamp will be restored. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent values * ORA-20006: Unable to restore statistics , statistics history not available * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_purge_stats(CAST(NULL AS text)); * @param before_timestamp `text`, входное значение. */ Datum dbms_stats_purge_stats(PG_FUNCTION_ARGS); /** * @brief Upgrade a user stat table from an older version * @details Input arguments: * ownname - The name of the schema * stattab - The user stat table identifier * Exceptions: * ORA-20000: Unable to upgrade table * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_remap_stat_table(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. * @param src_own `varchar2`, входное значение. * @param src_tab `varchar2`, входное значение. * @param tgt_own `varchar2`, входное значение. * @param tgt_tab `varchar2`, входное значение. */ Datum dbms_stats_remap_stat_table(PG_FUNCTION_ARGS); /** * @brief ------------------------- reset_advisor_task -------------------------------- * @details NAME: * reset_advisor_task * DESCRIPTION: * Reset a statistics advisor task execution to its initial state. * The procedure should be called on an execution that is not currently * executing. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_reset_advisor_task(CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. */ Datum dbms_stats_reset_advisor_task(PG_FUNCTION_ARGS); /** * @brief This procedure seeds column usage information from a statements in * @details the specified sql tuning set. * The procedure will iterate over the SQL statements in the SQL tuning * set and compile them in order to seed column usage information for * the columns that appear in these statements. This procedure records * group of columns as well. Extensions for the recorded group of columns * can be created using create_extended_stats procedure. * Parameters: * sqlset_name - sqlset name * owner_name - owner name * time_limit - time limit (in seconds). Default value is 1800s. * If sqlset_name and owner_name is null, it records the column (group) usage * information for the statements executed in the system in next time_limit * seconds. * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_reset_col_usage(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. */ Datum dbms_stats_reset_col_usage(PG_FUNCTION_ARGS); /** * @brief WARNING ** WARNING ---> obsoleted <--- WARNING ** WARNING * @details Please use RESET_GLOBAL_PREF_DEFAULTS() instead. * WARNING ** WARNING ---> obsoleted <--- WARNING ** WARNING * This procedure resets the default of parameters to ORACLE * recommended values. * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_reset_global_pref_defaults(); */ Datum dbms_stats_reset_global_pref_defaults(PG_FUNCTION_ARGS); /** * @brief WARNING ** WARNING ---> obsoleted <--- WARNING ** WARNING * @details Please use GET_PREFS() instead. * WARNING ** WARNING ---> obsoleted <--- WARNING ** WARNING * Get default value of parameters of dbms_stats procedures * Input arguments: * pname - parameter name * Exceptions: * ORA-20001: Invalid input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_reset_param_defaults(); */ Datum dbms_stats_reset_param_defaults(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to restore statistics of all tables of * @details a schema as of a specified timestamp (as_of_timestamp). * Input arguments: * ownname - schema of tables for which statistics to be restored * as_of_timestamp - statistics as of this timestamp will be restored. * force - restore statistics of tables even if their statistics are locked. * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid or inconsistent values * ORA-20006: Unable to restore statistics , statistics history not available * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_restore_database_stats(CAST(NULL AS text), CAST(NULL AS bool), CAST(NULL * AS bool)); * @param as_of_timestamp `text`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param no_invalidate `bool`, входное значение. */ Datum dbms_stats_restore_database_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to restore statistics of all fixed tables * @details as of a specified timestamp (as_of_timestamp). * To run this procedure, you must have the SYSDBA or ANALYZE ANY DICTIONARY * system privilege. * Input arguments: * as_of_timestamp - statistics as of this timestamp will be restored. * force - restore statistics of tables even if their statistics are locked. * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent values * ORA-20006: Unable to restore statistics , statistics history not available * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_restore_dictionary_stats(CAST(NULL AS text), CAST(NULL AS bool), * CAST(NULL AS bool)); * @param as_of_timestamp `text`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param no_invalidate `bool`, входное значение. */ Datum dbms_stats_restore_dictionary_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to restore statistics of all tables of * @details the database as of a specified timestamp (as_of_timestamp). * Input arguments: * as_of_timestamp - statistics as of this timestamp will be restored. * force - restore statistics of tables even if their statistics are locked. * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent values * ORA-20006: Unable to restore statistics , statistics history not available * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_restore_fixed_objects_stats(CAST(NULL AS text), CAST(NULL AS bool), * CAST(NULL AS bool)); * @param as_of_timestamp `text`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param no_invalidate `bool`, входное значение. */ Datum dbms_stats_restore_fixed_objects_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to restore statistics of a table as of * @details a specified timestamp (as_of_timestamp). The procedure will restore * statistics of associated indexes and columns as well. If the table * statistics were locked at the specified timestamp the procedure will * lock the statistics. * Note: * The procedure may not restore statistics correctly if analyze interface * is used for computing/deleting statistics. * Old statistics versions are not saved when SYSAUX tablespace is * offline, this affects restore functionality. * The procedure may not restore statistics if the table defn is * changed (eg: column added/deleted, partition exchanged etc). * Also it will not restore stats if the object is created after * the specified timestamp. * The procedure will not restore user defined statistics. * Input arguments: * ownname - schema of table for which statistics to be restored * tabname - table name * as_of_timestamp - statistics as of this timestamp will be restored. * restore_cluster_index - If the table is part of a cluster, * restore statistics of the cluster index if set to TRUE. * force - restore statistics even if the table statistics are locked. * if the table statistics were not locked at the specified * timestamp, it will unlock the statistics * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid or inconsistent values * ORA-20006: Unable to restore statistics , statistics history not available * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_restore_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS text), * CAST(NULL AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param as_of_timestamp `text`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param no_invalidate `bool`, входное значение. */ Datum dbms_stats_restore_schema_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to restore statistics of all dictionary * @details tables (tables of 'SYS', 'SYSTEM' and RDBMS component schemas) * as of a specified timestamp (as_of_timestamp). * To run this procedure, you must have the SYSDBA OR * both ANALYZE ANY DICTIONARY and ANALYZE ANY system privilege. * Input arguments: * as_of_timestamp - statistics as of this timestamp will be restored. * force - restore statistics of tables even if their statistics are locked. * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent values * ORA-20006: Unable to restore statistics , statistics history not available * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_restore_system_stats(CAST(NULL AS text)); * @param as_of_timestamp `text`, входное значение. */ Datum dbms_stats_restore_system_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to unlock the statistics of all * @details tables of a schema * Input arguments: * ownname - schema of tables to unlock * stattype - type of statistics to be unlocked * 'CACHE' - unlock only caching statistics * 'DATA' - unlock only data statistics * 'ALL' - unlock both data and caching statistics. This is the default * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_restore_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS text), CAST(NULL AS bool), CAST(NULL AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param as_of_timestamp `text`, входное значение. * @param restore_cluster_index `bool`, входное значение, по умолчанию false (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param no_invalidate `bool`, входное значение. */ Datum dbms_stats_restore_table_stats(PG_FUNCTION_ARGS); /** * @brief ------------------------- resume_advisor_task ------------------------------- * @details NAME: * resume_advisor_task * DESCRIPTION: * Resume a previously interrupted task. It will only resume the execution * that was most recently interrupted. * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_resume_advisor_task(CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. */ Datum dbms_stats_resume_advisor_task(PG_FUNCTION_ARGS); /** * @brief This procedure is used to delete the pendnig system statistics that * @details has been gathered but not published yet, i.e. stored as pending. * To run this procedure, you need to have the gather_system_statistics role. * Input Arguments: * None. * Examples: * dbms_stats.delete_pending_system_stats; * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_resume_gather_stats(); */ Datum dbms_stats_resume_gather_stats(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_save_inmemory_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_save_inmemory_stats(CAST(NULL AS number)); * @param objn `number`, входное значение. */ Datum dbms_stats_save_inmemory_stats(PG_FUNCTION_ARGS); /** * @brief This procedure transfers statistics for specified table(s) from a remote * @details database specified by dblink to the local database. It also transfers other * statistics related structures like synopses, DML monitoring information etc. * This procedure is allowed to execute as SYS only, otherwise you will * get an error message 'Insufficient privileges'. * In addition the user specified during the creation of the dblink is * expected to have privileges to select from tables in the SYS schema. * Parameters: * dblink - dblink name * ownname - owner name. If null transfers stats for all objects * in all schemas in the database. * tabname - table name. If null, transfers stats for all objects * of ownname. * options - different options. Specify ADD_GLOBAL_PREFS to * transfer global preferences as well. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid input * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_seed_col_usage(CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS binary_integer)); * @param sqlset_name `varchar2`, входное значение. * @param owner_name `varchar2`, входное значение. * @param time_limit `binary_integer`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_seed_col_usage(PG_FUNCTION_ARGS); /** * @brief --------------------- set_advisor_task_parameter ---------------------------- * @details NAME: * set_advisor_task_parameter * DESCRIPTION: * update the value of of a statistics advisor task parameter. * Possible parameters are: * TIME_LIMIT - Time Limit that the task can run (in minutes) * OP_START_TIME - Number of days the advisor task looks back * PARAMETERS: * task_name: (IN) - name of the statistics advisor task * parameter (IN) - Name of the parameter to set * value (IN) - New value of the parameter * NOTES: * The function will give an error if the specified parameter does not exist. * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: User Input errors * ORA-20012: Statistics Advisor errors * ----------------------------------------------------------------------------- * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_advisor_task_parameter(CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS varchar2)); * @param task_name `varchar2`, входное значение. * @param parameter `varchar2`, входное значение. * @param value `varchar2`, входное значение. */ Datum dbms_stats_set_advisor_task_parameter(PG_FUNCTION_ARGS); /** * @brief This procedure is used to resume statistics gathering at the point * @details where it was interrupted. Statistics gathering can be interrupted * as a result of a user action or a system event. * To run this procedure, you need to have the SYSDBA role OR both * ANALYZE ANY DICTIONARY and ANALYZE ANY system privileges. * Input arguments: * None. * Examples: * dbms_stats.resume_gather_stats(); * Exceptions: * ORA-20000: Insufficient privileges * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_column_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL * AS text), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS varchar2), CAST(NULL * AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param colname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param distcnt `number`, входное значение, по умолчанию NULL (source CSV). * @param density `number`, входное значение, по умолчанию NULL (source CSV). * @param nullcnt `number`, входное значение, по умолчанию NULL (source CSV). * @param srec `text`, входное значение, по умолчанию NULL (source CSV). * @param avgclen `number`, входное значение, по умолчанию NULL (source CSV). * @param flags `number`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_set_column_stats_0(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_set_column_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_column_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * varchar2), CAST(NULL AS raw), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param colname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param ext_stats `raw`, входное значение. * @param stattypown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattypname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_set_column_stats_1(PG_FUNCTION_ARGS); /** * @brief This procedure is used to import the statistics preferences of all * @details the tables owner by the specified owner name. * To run this procedure, you need to connect as owner, have the SYSDBA * privilege, OR have the ANALYZE ANY system privilege * Input arguments: * ownname - owner name * stattab - The user stat table identifier describing from where * to retrieve the statistics. * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different from ownname) * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.import_schema_prefs('SH', 'MY_STAT_TAB'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20000: Schema "" does not exist * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_database_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS bool)); * @param pname `varchar2`, входное значение. * @param pvalue `varchar2`, входное значение. * @param add_sys `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_set_database_prefs(PG_FUNCTION_ARGS); /** * @brief This procedure resets the global preference to the default values * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_global_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param pname `varchar2`, входное значение. * @param pvalue `varchar2`, входное значение. */ Datum dbms_stats_set_global_prefs(PG_FUNCTION_ARGS); /** * @brief Set column-related information * @details Input arguments: * ownname - The name of the schema * tabname - The name of the table to which this column belongs * colname - The name of the column or extension * partname - The name of the table partition in which to store * the statistics. If the table is partitioned and partname * is null, the statistics will be stored at the global table * level. * stattab - The user stat table identifier describing where * to store the statistics. If stattab is null, the statistics * will be stored directly in the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * distcnt - The number of distinct values * density - The column density. If this value is null and distcnt is * not null, density will be derived from distcnt. * nullcnt - The number of nulls * srec - StatRec structure filled in by a call to prepare_column_values * or get_column_stats. * avgclen - The average length for the column (in bytes) * flags - For internal Oracle use (should be left as null) * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * force - set the values even if statistics of the object is locked * Input arguments for user-defined statistics: * ext_stats - external (user-defined) statistics * stattypown - owner of statistics type associated with column * stattypname - name of statistics type associated with column * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid or inconsistent input values * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS * number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS * number), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param indname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param numrows `number`, входное значение, по умолчанию NULL (source CSV). * @param numlblks `number`, входное значение, по умолчанию NULL (source CSV). * @param numdist `number`, входное значение, по умолчанию NULL (source CSV). * @param avglblk `number`, входное значение, по умолчанию NULL (source CSV). * @param avgdblk `number`, входное значение, по умолчанию NULL (source CSV). * @param clstfct `number`, входное значение, по умолчанию NULL (source CSV). * @param indlevel `number`, входное значение, по умолчанию NULL (source CSV). * @param flags `number`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param guessq `number`, входное значение, по умолчанию NULL (source CSV). * @param cachedblk `number`, входное значение, по умолчанию NULL (source CSV). * @param cachehit `number`, входное значение, по умолчанию NULL (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_set_index_stats_0(PG_FUNCTION_ARGS); /** * @brief процедура dbms_stats_set_index_stats. * @details Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_index_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * raw), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS bool), CAST(NULL AS bool)); * @param ownname `varchar2`, входное значение. * @param indname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param ext_stats `raw`, входное значение. * @param stattypown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattypname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param force `bool`, входное значение, по умолчанию false (source CSV). */ Datum dbms_stats_set_index_stats_1(PG_FUNCTION_ARGS); /** * @brief Convert user-specified minimum, maximum, and histogram endpoint * @details datatype-specific values into Oracle's internal representation * for future storage via set_column_stats. * Generic input arguments: * srec.epc - The number of values specified in charvals, datevals, * numvals, or rawvals. This value must be between 2 and 2050 inclusive. * Should be set to 2 for procedures which don't allow histogram * information (nvarchar and rowid). * The first corresponding array entry should hold the minimum * value for the column and the last entry should hold the maximum. * If there are more than two entries, then all the others hold the * remaining histogram endpoint values * (with in-between values ordered from next-smallest to next-largest). * This value may be adjusted to account for compression, so the * returned value should be left as is for a call to set_column_stats. * srec.bkvals - If a frequency or hybrid histogram is desired, this array * contains the number of occurrences of each distinct value specified in * charvals, datevals, numvals, or rawvals. Otherwise, it is merely an * output argument and must be set to null when this procedure is * called. * srec.rpcnts - If a hybrid histogram is desired, this array contains * the total frequency of values that are less than or equal to each * distinct value specified in charvals, datevals, numvals, or rawvals. * Otherwise, it is merely an output argument and must be set to null * when this procedure is called. * As an example, for a given array numvals with numvals(i)=4, * rpcnts(i)=13 means that there are 13 rows in the column which * are less than or equal to 4. * ** Note that whenever srec.rpcnts is populated, srec.bkvals must be * populated as described above, too. * ** Also note that, whenever bkvals and/or rpcnts are populated, there * should not be any duplicates in charvals, datevals, numvals, or * rawvals. * Datatype specific input arguments (one of these): * charvals - The array of values when the column type is character-based. * Up to the first 64 bytes of each string should be provided. * Arrays must have between 2 and 2050 entries, inclusive. * If the datatype is fixed char, the strings must be space padded * to 15 characters for correct normalization. * datevals - The array of values when the column type is date-based. * numvals - The array of values when the column type is numeric-based. * rawvals - The array of values when the column type is raw. * Up to the first 64 bytes of each strings should be provided. * nvmin,nvmax - The minimum and maximum values when the column type * is national character set based (NLS). No histogram information * can be provided for a column of this type. * If the datatype is fixed char, the strings must be space padded * to 15 characters for correct normalization. * rwmin,rwmax - The minimum and maximum values when the column type * is rowid. No histogram information can be provided for a column * of this type. * Output arguments: * srec.minval - Internal representation of the minimum which is * suitable for use in a call to set_column_stats. * srec.maxval - Internal representation of the maximum which is * suitable for use in a call to set_column_stats. * srec.bkvals - array suitable for use in a call to set_column_stats. * srec.novals - array suitable for use in a call to set_column_stats. * srec.eavals - array suitable for use in a call to set_column_stats. * srec.rpcnts - array suitable for use in a call to set_column_stats. * Exceptions: * ORA-20001: Invalid or inconsistent input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_param(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param pname `varchar2`, входное значение. * @param pval `varchar2`, входное значение. */ Datum dbms_stats_set_param(PG_FUNCTION_ARGS); /** * @brief This procedure reports the recorded column (group) usage information. * @details Parameters: * ownname - owner name. If null it reports column usage * information for tables in all schemas in the database. * tabname - table name. If null, it reports column usage * information for all tables of ownname. * Examples: * The following example shows column usage information for customers table * in SH schema. * SQL> set long 100000 * SQL> set lines 120 * SQL> set pages 0 * SQL> * SQL> -- Display column usage * SQL> select dbms_stats.report_col_usage('sh', 'customers') from dual; * LEGEND: * ....... * EQ : Used in single table EQuality predicate * RANGE : Used in single table RANGE predicate * LIKE : Used in single table LIKE predicate * NULL : Used in single table is (not) NULL predicate * EQ_JOIN : Used in EQuality JOIN predicate * NONEQ_JOIN : Used in NON EQuality JOIN predicate * FILTER : Used in single table FILTER predicate * JOIN : Used in JOIN predicate * GROUP_BY : Used in GROUP BY expression * ............................................................................. * ############################################################################# * COLUMN USAGE REPORT FOR SH.CUSTOMERS * .................................... * 1. COUNTRY_ID : EQ * 2. CUST_CITY : EQ * 3. CUST_STATE_PROVINCE : EQ * 4. (CUST_CITY, CUST_STATE_PROVINCE, * COUNTRY_ID) : FILTER * 5. (CUST_STATE_PROVINCE, COUNTRY_ID) : GROUP_BY * ############################################################################# * ----------------------------------------------------------------------- * procedure set_processing_rate * ----------------------------------------------------------------------- * Sets the value of rate of processing for a given operation. * Input arguments: * opName - Name of the operation * Valid values: ALL, CPU, CPU_ACCESS, CPU_AGGR, * CPU_BYTES_PER_SEC, CPU_FILTER, CPU_GBY, CPU_HASH_JOIN, * CPU_JOIN, CPU_NL_JOIN, CPU_RANDOM_ACCESS, * CPU_SEQUENTIAL_ACCESS, CPU_SM_JOIN, CPU_SORT, IO, * IO_ACCESS, IO_BYTES_PER_SEC, IO_RANDOM_ACCESS, * IO_SEQUENTIAL_ACCESS, HASH, AGGR, MEMCMP, MEMCPY * procRate - Processing Rate * Output arguments: None * Privileges: The user issuing should have the role optimizer_processing_rate * or dba * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Invalid or inconsistent input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_processing_rate(CAST(NULL AS varchar2), CAST(NULL AS number)); * @param opname `varchar2`, входное значение. * @param procrate `number`, входное значение. */ Datum dbms_stats_set_processing_rate(PG_FUNCTION_ARGS); /** * @brief This procedure is used to set the statistics preferences of the * @details specified table in the specified schema. * To run this procedure, you need to connect as owner of the table * or be granted ANALYZE ANY system privilege. * Input arguments: * ownname - owner name * tabname - table name * stattab - The user stat table identifier describing from where * to retrieve the statistics. * statid - (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * Notes: * All arguments are of type varchar2 and values are enclosed in quotes. * Examples: * dbms_stats.import_table_prefs('SH', 'SALES', 'MY_STAT_TAB'); * Exceptions: * ORA-20000: Insufficient privileges * ORA-20000: Schema "" does not exist * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_schema_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param pname `varchar2`, входное значение. * @param pvalue `varchar2`, входное значение. */ Datum dbms_stats_set_schema_prefs(PG_FUNCTION_ARGS); /** * @brief Input arguments: * @details stattab - The user stat table identifier describing from where to get * the current statistics info. If stattab is null, the statistics info * will be obtained directly from the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab. * statown - The schema containing stattab (if different then ownname) * pname - parameter name to get * Output arguments: * status - returns one of the following: COMPLETED, AUTOGATHERING, * MANUALGATHERING, BADSTATS * dstart - date when system stats gathering has been started * dstop - date when gathering was finished if status = COMPLETE, * will be finished if status = AUTOGATHERING, * had to be finished if status = BADSTATS, * dstarted if status = MANUALGATHERING, * the following parameters defined only if status = COMPLETE * pvalue - parameter value to get * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20003: Unable to get system statistics * ORA-20004: Parameter doesn't exist * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_system_stats(CAST(NULL AS varchar2), CAST(NULL AS number), CAST(NULL * AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param pname `varchar2`, входное значение. * @param pvalue `number`, входное значение. * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_set_system_stats(PG_FUNCTION_ARGS); /** * @brief Get default value of the specified preference. * @details If the ownname and tabname are provided and a preference has been entered * for the table then it returns the preference as specified for the table. * In all other cases it returns the global preference, in case it has been * specified, otherwise the default value is returned. * Input arguments: * pname - preference name * The default value for following preferences can be retrieved. * CASCADE * DEGREE * ESTIMATE_PERCENT * METHOD_OPT * NO_INVALIDATE * GRANULARITY * PUBLISH * INCREMENTAL * INCREMENTAL_LEVEL * INCREMENTAL_STALENESS * GLOBAL_TEMP_TABLE_STATS * STALE_PERCENT * AUTOSTATS_TARGET * CONCURRENT * TABLE_CACHED_BLOCKS * OPTIONS * STAT_CATEGORY * PREFERENCE_OVERRIDES_PARAMETER * APPROXIMATE_NDV_ALGORITHM * AUTO_STAT_EXTENSIONS * WAIT_TIME_TO_UPDATE_STATS * ROOT_TRIGGER_PDB * COORDINATOR_TRIGGER_SHARD * AUTO_STATS_ADVISOR_TASK * ownname - owner name * tabname - table name * Exceptions: * ORA-20001: Invalid input values * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_table_prefs(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param pname `varchar2`, входное значение. * @param pvalue `varchar2`, входное значение. */ Datum dbms_stats_set_table_prefs(PG_FUNCTION_ARGS); /** * @brief Set index-related information * @details Input arguments: * ownname - The name of the schema * indname - The name of the index * partname - The name of the index partition in which to store * the statistics. If the index is partitioned and partname * is null, the statistics will be stored at the global index * level. * stattab - The user stat table identifier describing where * to store the statistics. If stattab is null, the statistics * will be stored directly in the dictionary. * statid - The (optional) identifier to associate with these statistics * within stattab (Only pertinent if stattab is not NULL). * numrows - The number of rows in the index (partition) * numlblks - The number of leaf blocks in the index (partition) * numdist - The number of distinct keys in the index (partition) * avglblk - Average integral number of leaf blocks in which each * distinct key appears for this index (partition). If not provided, * this value will be derived from numlblks and numdist. * avgdblk - Average integral number of data blocks in the table * pointed to by a distinct key for this index (partition). * If not provided, this value will be derived from clstfct * and numdist. * clstfct - See clustering_factor column of the all_indexes view * for a description. * indlevel - The height of the index (partition) * flags - For internal Oracle use (should be left as null) * statown - The schema containing stattab (if different then ownname) * no_invalidate - Do not invalide the dependent cursors if set to TRUE. * The procedure invalidates the dependent cursors immediately * if set to FALSE. * Use DBMS_STATS.AUTO_INVALIDATE to have oracle decide when to * invalidate dependend cursors. This is the default. The default * can be changed using set_param procedure. * guessq - IOT guess quality. See pct_direct_access column of the * all_indexes view for a description. * force - set the values even if statistics of the object is locked * Input arguments for user-defined statistics: * ext_stats - external (user-defined) statistics * stattypown - owner of statistics type associated with index * stattypname - name of statistics type associated with index * Exceptions: * ORA-20000: Object does not exist or insufficient privileges * ORA-20001: Invalid input value * ORA-20002: Bad user statistics table, may need to upgrade it * ORA-20005: object statistics are locked * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_set_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL AS * number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS * varchar2), CAST(NULL AS bool), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS * bool), CAST(NULL AS number), CAST(NULL AS number), CAST(NULL AS number)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param stattab `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param statid `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param numrows `number`, входное значение, по умолчанию NULL (source CSV). * @param numblks `number`, входное значение, по умолчанию NULL (source CSV). * @param avgrlen `number`, входное значение, по умолчанию NULL (source CSV). * @param flags `number`, входное значение, по умолчанию NULL (source CSV). * @param statown `varchar2`, входное значение, по умолчанию NULL (source CSV). * @param no_invalidate `bool`, входное значение. * @param cachedblk `number`, входное значение, по умолчанию NULL (source CSV). * @param cachehit `number`, входное значение, по умолчанию NULL (source CSV). * @param force `bool`, входное значение, по умолчанию false (source CSV). * @param im_imcu_count `number`, входное значение, по умолчанию NULL (source CSV). * @param im_block_count `number`, входное значение, по умолчанию NULL (source CSV). * @param scanrate `number`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_set_table_stats(PG_FUNCTION_ARGS); /** * @brief This procedure merges column usage information from a source database, * @details specified via a dblink, into the local database. * If the column usage information already exists for a given table and * column then it will combine both the local and the remote information * otherwise it will insert the remote information as new. * This procedure is allowed to execute as SYS only, otherwise you will * get an error message 'Insufficient privileges'. * In addition the user specified during the creation of the dblink is * expected to have privileges to select from tables in the SYS schema. * Parameters: * dblink - dblink name * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Parameter dblink cannot be null * ORA-20002: Unable to create a temp table * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_transfer_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), CAST(NULL * AS varchar2), CAST(NULL AS number)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param dblink `varchar2`, входное значение. * @param options `number`, входное значение, по умолчанию NULL (source CSV). */ Datum dbms_stats_transfer_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to unlock the statistics on the table * @details Input arguments: * ownname - schema of table to unlock * tabname - name of the table * stattype - type of statistics to be unlocked * 'CACHE' - unlock only caching statistics * 'DATA' - unlock only data statistics * 'ALL' - unlock both data and caching statistics. This is the default * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_unlock_partition_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param partname `varchar2`, входное значение. */ Datum dbms_stats_unlock_partition_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to unlock statistics for a partition * @details Input arguments: * ownname - schema of table to unlock * tabname - name of the table * partname - name of the partition * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_unlock_schema_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). */ Datum dbms_stats_unlock_schema_stats(PG_FUNCTION_ARGS); /** * @brief This procedure enables the user to lock the statistics of all * @details tables of a schema * Input arguments: * ownname - schema of tables to lock * stattype - type of statistics to be locked * 'CACHE' - lock only caching statistics * 'DATA' - lock only data statistics * 'ALL' - lock both data and caching statistics. This is the default * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_unlock_table_stats(CAST(NULL AS varchar2), CAST(NULL AS varchar2), * CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param tabname `varchar2`, входное значение. * @param stattype `varchar2`, входное значение, по умолчанию ALL (source CSV). */ Datum dbms_stats_unlock_table_stats(PG_FUNCTION_ARGS); /** * @brief Drops a user stat table * @details Input arguments: * ownname - The name of the schema * stattab - The user stat table identifier * Exceptions: * ORA-20000: Insufficient privileges * ORA-20001: Table is not a statistics table * ORA-20002: Table does not exist * Сгенерирован публичный SQL-контракт и каркас C++ без прикладной реализации. * Входы и результат нормализованы из inventory/spec для синхронизации HPP и каталога. * Примеры: * CALL dbms_stats_upgrade_stat_table(CAST(NULL AS varchar2), CAST(NULL AS varchar2)); * @param ownname `varchar2`, входное значение. * @param stattab `varchar2`, входное значение. */ Datum dbms_stats_upgrade_stat_table(PG_FUNCTION_ARGS); } // extern "C" #endif // DBMS_STATS_INTERNAL_HPP