当前位置: 首页 > news >正文

Oracle DBMS_XPLAN包

DBMS_XPLAN 包的解释和关键点

DBMS_XPLAN 包是 Oracle 数据库中一个重要的工具,它允许数据库管理员和开发人员以各种方式显示 SQL 语句的执行计划,这对于 SQL 优化和性能诊断至关重要。以下是主要函数及其描述:

用于显示执行计划的主要函数
  1. display
    • 目的: 显示存储在指定计划表中的执行计划。
    • 参数:
      • table_name (默认值 'PLAN_TABLE'): 计划表的名称。
      • statement_id (可选): 标识 SQL 语句的 ID。
      • format (默认值 'TYPICAL'): 输出计划的格式。
      • filter_preds (可选): 用于过滤计划表内容的谓词。
  1. display_cursor
    • 目的: 显示当前或最后执行的 SQL 语句的执行计划。
    • 参数:
      • sql_id (可选): 指定 SQL 语句的 sql_id
      • cursor_child_no (默认值 0): 指定游标的子号。
      • format (默认值 'TYPICAL'): 输出计划的格式。
  1. display_awr
    • 目的: 显示存储在 AWR(自动工作负载库)中的执行计划。
    • 参数:
      • sql_id: 指定 SQL 语句的 sql_id
      • plan_hash_value (可选): 指定特定的执行计划。
      • db_id (可选): 指定特定数据库的 ID。
      • format (默认值 'TYPICAL'): 输出计划的格式。
  1. display_sqlset
    • 目的: 显示存储在 SQL 调优集中 SQL 语句的执行计划。
    • 参数:
      • sqlset_name: SQL 调优集的名称。
      • sql_id: 指定 SQL 语句的 sql_id
      • plan_hash_value (可选): 指定特定的执行计划。
      • format (默认值 'TYPICAL'): 输出计划的格式。
      • sqlset_owner (可选): SQL 调优集的拥有者,默认是当前用户。
  1. display_sql_plan_baseline
    • 目的: 显示 SQL 计划基线中的执行计划。
    • 参数:
      • sql_handle (可选): 标识 SQL 语句的句柄。
      • plan_name (可选): 指定特定计划的名称。
      • format (默认值 'TYPICAL'): 输出计划的格式。
内部使用的私有函数和过程

这些函数和过程用于内部用途,主要用于数据准备和格式验证,不需要公开文档。

  • prepare_records: 准备记录的内部过程。
  • validate_format: 验证用户格式的内部函数。
  • format_size, format_number: 格式化数字和大小的函数。
  • format_time_s: 格式化时间(秒)的函数。
  • prepare_plan_xml_query: 为查询构建 XML 版本的辅助函数。
  • build_plan_xml: 生成 XML 版本的执行计划。
  • display_plan: 以 CLOB 格式返回执行计划。
比较执行计划的支持函数

这些函数用于比较不同执行计划,通常返回任务 ID,供后续报告生成使用。

  • diff_plan_outline: 比较两个通过指定轮廓生成的 SQL 计划。
  • diff_plan: 比较参考计划和目标计划。
  • diff_plan_sql_baseline: 比较 SQL 计划基线中的两个计划。
  • diff_plan_cursor: 比较从指定游标子号生成的两个 SQL 计划。
  • diff_plan_awr: 比较通过指定计划哈希值生成的两个 SQL 计划。
  • get_plandiff_report_xml: 构建差异报告的 XML 版本。

示例代码

显示存储在计划表中的执行计划
SET LINESIZE 150
SET PAGESIZE 2000
SELECT * FROM TABLE(dbms_xplan.display);
显示当前或最后执行的 SQL 语句的执行计划
SET LINESIZE 150
SET PAGESIZE 2000
SELECT * FROM TABLE(dbms_xplan.display_cursor);
显示存储在 AWR 中的执行计划
SET LINESIZE 150
SET PAGESIZE 2000
SELECT t.*
FROM dba_hist_sqltext ht,TABLE(dbms_xplan.display_awr(ht.sql_id, NULL, NULL, '-PREDICATE +ALIAS')) t
WHERE ht.sql_text LIKE '%sAleS%';

函数

create or replace package dbms_xplan AUTHID CURRENT_USER as--- --------------------------------------------------------------------------- DBMS_XPLAN CONSTANTS SECTION--- --------------------------------------------------------------------------- The following constants designate the flags returned in the bit vector--- from the COMPARE_QUERY_PLANS function.UNKNOWN_DIFF_CLASS         CONSTANT NUMBER := POWER(2,31);--- --------------------------------------------------------------------------- DBMS_XPLAN PUBLIC FUNCTIONS SECTION--- ------------------------------------------------------------------------------ OVERVIEW------   This package defines several table functions which can be used to---   display execution plans.------   - DISPLAY is generally used to display the execution plan produced---             by an EXPLAIN PLAN command; you can either display the most---             recent explained statement, or the statement for a specific---             statement id.------             In addition, this table function can also be used to display---             any plan (with or without statistics) stored in a table as---             long as the columns of this table are named the same as---             columns of the plan_table (or v$sql_plan_statistics_all if---             statistics are included).---             A predicate on the specified table can be used to select rows---             of the plan to display.------   - DISPLAY_CURSOR displays the execution plans for one or several---             cursors in the shared SQL area, depending on a filter---             criteria. It can display the plan for the last executed---             statement, the current (if session is active) or last---             executed statement (if session is inactive) of a specific---             session, or all cursors matching an arbitrary criteria---             defined via SQL. In addition to the explain plan, various---             plan statistics (e.g. io, memory and timing) can be---             reported (based on the v$sql_plan_statistics_all views).------             Specific cursors are identified by SQL_ID and optionally a---             SQL_CHILD_NUMBER.------             The DEFAULT without any parameters shows the last executed---             statement of the session.------             NOTE: To use the DISPLAY_CURSOR functionality, the calling---             user must have SELECT privilege on V$SQL_PLAN_STATISTICS_ALL,---             V$SQL, and V$SQL_PLAN. By default, only the select_catalog---             role has the SELECT privilege on these views.------   - DISPLAY_AWR displays the execution plans for SQL statements stored in---             the Automatic Workload Repository (AWR).---             NOTE: To use the DISPLAY_AWR functionality, the calling user---             must have SELECT prvilege on DBA_HIST_SQL_PLAN and---             DBA_HIST_SQLTEXT. By default, select privilige for these---             views is granted to the select_catalog role.------   - DISPLAY_SQLSET displays the execution plans for SQL statements stored---             in a SQL tuning set.---             NOTE: To use the DISPLAY_SQLSET functionality, the calling---             user must have SELECT prvilege on ALL_SQLSET_PLANS and---             ALL_SQLSET_STATEMENTS. By default, select privilige for these---             views is granted to the public role.------   - DISPLAY_SQL_PLAN_BASELINE displays one or more execution plans for---             the specified sql_handle of a SQL statement. If plan_name is---             specified denoting a single plan then that plan is displayed.---             The plan information stored in the SQL management base is---             used to generate and display the plan. It is possible that---             the stored plan id may not match up with the plan id of the--              generated plan. A plan id mismatch means that the stored plan---             is not reproducible. Such a plan is deemed invalid by the---             optimizer and ignored when the corresponding SQL statement is--              compiled and a cursor is built. When plan id mismatch occurs---             a note saying 'the plan is invalid' is shown in the notes---             section of the plan.---             NOTE: To use DISPLAY_SQL_PLAN_BASELINE function, the calling---             user must have SELECT prvilege on DBA_SQL_PLAN_BASELINES---             view.  By default, SELECT privilege on this view is granted---             to the SELECT_CATALOG_ROLE.---------   For example:---     To show the last explained statement---        explain plan for select ename, deptno---                         from emp e, dept d---                         where e.deptno = d.deptno;---        select * from table(dbms_xplan.display);------     To show the last executed statement of your session---        select * from table(dbms_xplan.display_cursor);------     See more detailed examples below------ SECURITY------   The execution privilege on this package is granted to PUBLIC.---   The display procedures of this package are run under the caller---   security.--------- PROCEDURES AND FUNCTIONS------   function display(table_name   varchar2 default 'PLAN_TABLE',---                    statement_id varchar2 default null,---                    format       varchar2 default 'TYPICAL',---                    filter_preds varchar2 default null)------   - table_name:---        specifies the table name where the plan is stored. This---        parameter defaults to "PLAN_TABLE" which is the default---        plan table for the explain plan. If NULL is specified,---        the default of 'PLAN_TABLE' will be taken into account.---        The parameter is case insensitive.------   - statement_id:---        specifies the statement id of the plan to display. This---        parameter defaults to NULL. If no statement_id is defined,---        the most recent explained statement in <table_name> will---        be displayed, assuming that the "filter_preds" parameter is---        NULL (its default).------   - format:---        Determines what information stored in the plan will be---        shown. The format string can use the following predefined---        three formats, each representing a common use case:------        'BASIC':   Display only the minimum set of information, i.e. the---                   operation id, the operation name and its option------        'TYPICAL': This is the default. Display most information---                   of the explain plan (operation id, name and option,---                   #rows, #bytes and optimizer cost). Pruning,---                   parallel and predicate information are only---                   displayed when applicable. Excludes only PROJECTION,---                   ALIAS and REMOTE SQL information (see below).------        'ALL':     Maximum user level, like typical with additional---                   informations (PROJECTION, ALIAS and information about---                   REMOTE SQL if the operation is distributed).------        For finer control on the display output, the following keywords---        can be added to the above three standard format to customize their---        default behavior. Each keyword either represents a logical group---        of plan table columns (e.g. PARTITION) or logical additions to the---        base plan table output (e.g. PREDICATE). Format keywords must---        be separated by either a comma or a space:------        ROWS: if relevant, shows number of rows estimated by the optimizer------        BYTES: if relevant, shows number of bytes estimated by the---               optimizer------        COST: if relevant, shows optimizer cost information------        PARTITION: If relevant, shows partition pruning information------        PARALLEL: If relevant, shows PX information (distribution method---                  and table queue information)------        PREDICATE: If relevant, shows the predicate section------        PROJECTION: If relevant, shows the projection section------        ALIAS: If relevant, shows the "Query Block Name / Object Alias"---               section------        REMOTE: If relevant, shows the information for distributed query---                (e.g. remote from serial distribution and remote SQL)------        NOTE: If relevant, shows the note section of the explain plan.------      Format keywords can be prefixed by the sign '-' to exclude the---      specified information. For example, '-PROJECTION' exclude---      projection information.------      Finally, if the target plan table (see "table_name" parameter) also---      stores plan statistics columns (e.g. it is a table used to capture---      the content of the fixed view v$sql_plan_statistics_all), then---      additional format keywords can be used to specify which class of---      statistics to display. These additionnal format keywords are IOSTATS,---      MEMSTATS, ALLSTATS and LAST described along with the display_cursor()---      table function (see below).------      Example:---        - use 'ALL -PROJECTION -NOTE' to display everything except the---          projection and note sections.------        - use 'TYPICAL PROJECTION' to display using the typical format---          with the additional projection section (which is normally excluded---          under the typical format). Since typical is default, using---          simply 'PROJECTION' is equivalent.------        - use '-BYTES -COST -PREDICATE' to display using the typical---         format but excluding optimizer cost and byte estimates---         as well as the predicate section.------        - use 'BASIC ROWS' to display basic information with the---          additional number of rows estimated by the optimizer.---------   - filter_preds: SQL filter predicate(s) to restrict the set of rows---                   selected from the table where the plan is stored. When---                   value is NULL (the default), the plan displayed---                   corresponds to the last executed explain plan.------                   For example:------                     filter_preds=>'plan_id = 10'------                   "filter_preds" can reference any column of the table---                   where the plan is stored and can contain any SQL---                   construct (e.g. sub-query, function calls...).------                   WARNING: Application developers should expose this---                   parameter to end-users only after careful---                   consideration since it could expose the application---                   to SQL injection. Indeed, "filter_preds" can---                   potentially reference any table or execute any server---                   function for which the database user invoking the---                   table function has privileges.------   ---------------------------------------------------------------------------   function display_cursor(sql_id           varchar2 default null,---                           cursor_child_no  integer default 0,---                           format           varchar2 default 'TYPICAL')------   - sql_id:---        specifies the sql_id value for a specific SQL statement, as---        shown in V$SQL.SQL_ID, V$SESSION.SQL_ID, or---        V$SESSION.PREV_SQL_ID. If no sql_id is specified, the last---        executed statement of the current session is shown.------   - cursor_child_no:---        specifies the child number for a specific sql cursor, as shown in---        V$SQL.CHILD_NUMBER or in V$SESSION.SQL_CHILD_NUMBER,---        V$SESSION.PREV_CHILD_NUMBER. This input parameter is only---        considered when sql_id is set.------        If not specified, all child cursors for the specified sql_id are---        displayed.------   - format:---        The format string has the same meaning as that for the regular---        display() table function (see format description above). In---        addition, the following four format keywords are introduced---        to support the various plan statistics columns available---        in v$sql_plan_statistics_all.------        These keywords can also be used by the display() table function---        assuming that the specified table has the same statistics columns---        available in v$sql_plan_statistics_all.------        IOSTATS: Assuming that basic plan statistics are---                 collected when SQL statements are executed (either by---                 using the gather_plan_statistics hint or by setting the---                 parameter statistics_level to ALL), this format will show---                 IO statistics for all (or only for the last as shown below)---                 executions of the cursor.------        MEMSTATS: Assuming that PGA memory management is enabled (i.e---                  pga_aggregate_target parameter is set to a non 0 value),---                  this format allows to display memory management---                  statistics (e.g. execution mode of the operator, how---                  much memory was used, number of bytes spilled to---                  disk, ...). These statistics only apply to memory---                  intensive operations like hash-joins, sort or some bitmap---                  operators.------        ALLSTATS: A shortcut for 'IOSTATS MEMSTATS'------        LAST: By default, plan statistics are shown for all executions of---              the cursor. The keyword LAST can be specified to see only---              the statistics for the last execution.---------        Also, the following two formats are still supported for backward---        compatibility:------        'RUNSTATS_TOT':  Same as 'IOSTATS', i.e. displays IO statistics---                         for all executions of the specified cursor.---        'RUNSTATS_LAST': Same as 'IOSTATS LAST', i.e. displays the runtime---                         statistics for the last execution of the cursor.---------   PRIVILEGES:---   -    To use the DISPLAY_CURSOR functionality, the calling---        user must have SELECT privilege on V$SQL_PLAN_STATISTICS_ALL,---        V$SQL, and V$SQL_PLAN, otherwise it will show an appropriate---        error message.------   -    Unless used in DEFAULT mode to display the last executed---        statement, all internal SQL statements of this package and---        the calling SQL statement using this table function will be---        suppressed.------   ---------------------------------------------------------------------------   function display_awr(sql_id          varchar2,---                        plan_hash_value integer  default null,---                        db_id           integer  default null,---                        format          varchar2 default 'TYPICAL')------   - sql_id:---        specifies the sql_id value for a SQL statement having its plan(s)---        stored in the AWR. You can find all stored SQL statements by---        querying DBA_HIST_SQL_PLAN.------   - plan_hash_value:---        identifies a specific stored execution plan for a SQL statement.---        Optional parameter. If suppressed, all stored execution plans are---        shown.------   - db_id:---        identifies the plans for a specific dabatase. If this parameter is---        omitted, it will be defaulted to the local database identifier.------   - format:---        The format string has the same meaning as that for the regular---        display() table function (see format description above).------   ---------------------------------------------------------------------------   function display_sqlset(sqlset_name     varchar2,---                           sql_id          varchar2,---                           plan_hash_value integer  default null,---                           format          varchar2 default 'TYPICAL',---                           sqlset_owner    varchar2 default null)------   - sqlset_name:---        specified the name of the SQL tuning set.------   - sql_id:---        specifies the sql_id value for a SQL statement having its plan(s)---        stored in the SQL tuning set. You can find all stored SQL---        statements by querying USER/DBA/ALL_SQLSET_PLANS or table function---        SELECT_SQLSET from package dbms_sqltune.------   - plan_hash_value:---        identifies a specific stored execution plan for a SQL statement.---        Optional parameter. If suppressed, all stored execution plans are---        shown.------   - format:---        The format string has the same meaning as that for the regular---        display() table function (see format description above).------   - sqlset_owner:---        Specifies the owner of the SQL tuning set. The default is the---        name of the current user.------   ---------------------------------------------------------------------------   function display_sql_plan_baseline(---                          sql_handle       varchar2  default  NULL,---                          plan_name        varchar2  default  NULL,---                          format           varchar2  default  'TYPICAL')------   - sql_handle:---        SQL statement handle. It identifies the SQL statement whose plans---        are to be explained and displayed. If NULL then PLAN_NAME must be---        specified.---        You can find SQL plan baselines created for various SQL statements---        by querying DBA_SQL_PLAN_BASELINES catalog view.------   - plan_name:---        Plan name. It identifies a specific plan to be explained and---        displayed. Default NULL means all plans associated with identified---        SQL statement to be explained and displayed. If NULL then---        sql_handle must be specified.------   - format:---        The format string has the same meaning as that for the regular---        display() table function (see format description above).------   ---------------------------------------------------------------------------   Examples DBMS_XPLAN.DISPLAY():------   1/ display the last explain plan stored in the plan table:------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display);---------   2/ display from the plan table "my_plan_table":------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display('my_plan_table'));---------   3/ display minimum plan table:------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display(null, null,'basic'));---------   4/ display all information in plan table, excluding projection:------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display(null, null,---                                             'all -projection'));---------   5/ display the plan whose statement_id is 'foo':------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display('plan_table', 'foo'));---------   6/ display statpack plan for hash_value=76725 and snap_id=245------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display('stats$sql_plan', null,---                          'all', 'hash_value=76725 and snap_id=245'));------   ---------------------------------------------------------------------------   Examples DBMS_XPLAN.DISPLAY_CURSOR():------   1/ display the currently or last executed statement---      (this will also show the usage of this package)------      set linesize 150---      set pagesize 2000---      select * from table(dbms_xplan.display_cursor);---------   2/ display the currently or last executed statement of session id 9---      (it will return 'no rows selected' for any SQL statement using---       this package)------    - Identify the sql_id and the child_number in---      a separate SQL statement and use them as parameters for---      DISPLAY_CUSRSOR()------      SQL> select prev_sql_id, prev_child_number---           from v$session where sid=9;------      PREV_SQL_ID   PREV_CHILD_NUMBER---      ------------- --------------------      f98t6zufy04g5                 0------      set linesize 150---      set pagesize 2000---      select *---      from table(dbms_xplan.display_cursor('f98t6zufy04g5', 0));------    - Alternatively, you can combine the two statements into one------      set linesize 150---      set pagesize 2000---      select t.*---      from v$session s,---           table(dbms_xplan.display_cursor(s.prev_sql_id,---                                           s.prev_child_number)) t---      where s.sid=9;------      NOTE: the table deriving the input parameters for---            DBMS_XPLAN.DISPLAY_CURSOR() must be the FIRST (left-side)---            table(s) in the select statement relative to the table function---------   3/ display all cursors containing the case sensisitve string 'FoOoO',---      excluding SQL parsed by SYS------      set linesize 150---      set pagesize 2000---      select t.*---      from v$sql s,---           table(dbms_xplan.display_cursor(s.sql_id,---                                           s.child_number)) t---      where s.sql_text like '%FoOoO%' and s.parsing_user_id <> 0;---------   4/ display all information about all cursors containing the case---      insensitive string 'FOO', including SQL parsed by SYS------      set linesize 150---      set pagesize 2000---      select t.*---      from v$sql s,---           table(dbms_xplan.display_cursor(s.sql_id,---                                           s.child_number, 'ALL')) t---      where upper(s.sql_text) like '%FOO%';---------   5/ display the last executed runtime statistics for all cursors---      containing the case insensitive string 'sales', including SQL---      parsed by SYS------      set linesize 150---      set pagesize 2000---      select t.*---      from v$sql s,---           table(dbms_xplan.display_cursor(s.sql_id, s.child_number,---                                           'ALLSTATS LAST')) t---      where lower(s.sql_text) like '%sales%';---------   6/ display the aggregated runtime statistics for all cursors containing---      the case sensitive string 'sAleS' and were parsed by user SH------      set linesize 150---      set pagesize 2000---      select t.*---      from v$sql s, dba_users u,---           table(dbms_xplan.display_cursor(s.sql_id, s.child_number,---                                           'RUNSTATS_TOT')) t---      where s.sql_text like '%sAleS%'---      and u.user_id=s.parsing_user_id---      and u.username='SH';------   ---------------------------------------------------------------------------   Examples DBMS_XPLAN.DISPLAY_AWR():------   1/ display all stored plans in the AWR containing---      the case sensitive string 'sAleS'. Don't display predicate---      information but add the query block name / alias section.------      set linesize 150---      set pagesize 2000---      select t.*---      from dba_hist_sqltext ht,---           table(dbms_xplan.display_awr(ht.sql_id, null, null,---                                        '-PREDICATE +ALIAS')) t---      where ht.sql_text like '%sAleS%';------      NOTE: the table deriving the input parameters for---            DBMS_XPLAN.DISPLAY_AWR() must be the FIRST (left-side)---            table(s) in the select statement relative to the table---            function.------   ---------------------------------------------------------------------------   Examples DBMS_XPLAN.DISPLAY_SQLSET():------   1/ display all stored plans for a given statement in the SQL tuning set---       named 'my_sts' owner by the current user (the caller).------      set linesize 150---      set pagesize 2000---      select *---      from table(dbms_xplan.display_sqlset('my_sts',---                                           'gcfysssf6hykh',---                                            null,---                                           'ALL -NOTE -PROJECTION')) t------   ---------------------------------------------------------------------------   Examples DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE():------   1/ display all plans of a SQL statement identified by the sql handle---     'SYS_SQL_b1d49f6074ab95af' using TYPICAL format.------      set linesize 150---      set pagesize 2000---      select t.*---      from table(dbms_xplan.display_sql_plan_baseline(---                                           'SYS_SQL_b1d49f6074ab95af')) t;------   2/ display all plans of one or more SQL statements containing the---      string 'HR2' using BASIC format.------      set linesize 150---      set pagesize 2000---      select t.*---      from (select distinct sql_handle from dba_sql_plan_baselines---            where sql_text like '%HR2%') pb,---           table(dbms_xplan.display_sql_plan_baseline(pb.sql_handle, null,---                                                      'basic')) t;------      NOTE: the table deriving the input parameters for---            DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE() must be the first---            (left-side) table in the select statement relative to the---            table function.------ --------------------------------------------------------------------------- display from PLAN_TABLEfunction display(table_name   varchar2      default 'PLAN_TABLE',statement_id varchar2      default null,format       varchar2      default 'TYPICAL',filter_preds varchar2      default null)return dbms_xplan_type_tablepipelined;-- display from V$SQL_PLAN (or V$SQL_PLAN_STATISTICS_ALL)function display_cursor(sql_id           varchar2 default  null,cursor_child_no  integer  default  0,format           varchar2 default  'TYPICAL')return dbms_xplan_type_tablepipelined;-- display from AWRfunction display_awr(sql_id          varchar2,plan_hash_value integer  default null,db_id           integer  default null,format          varchar2 default 'TYPICAL')return dbms_xplan_type_tablepipelined;-- display from SQL tuning setfunction display_sqlset(sqlset_name     varchar2,sql_id          varchar2,plan_hash_value integer  default null,format          varchar2 default 'TYPICAL',sqlset_owner    varchar2 default null)return dbms_xplan_type_tablepipelined;-- display from SQL plan baselinefunction display_sql_plan_baseline(sql_handle    varchar2 default null,plan_name     varchar2 default null,format        varchar2 default 'TYPICAL')return dbms_xplan_type_tablepipelined;------------------------------------------------------------------------------ ---------------------------------------------------------------------- ----                                                                        ---- The folloing section of this package contains functions and procedures ---- which are for INTERNAL use ONLY. PLEASE DO NO DOCUMENT THEM.           ----                                                                        ---- ---------------------------------------------------------------------- -------------------------------------------------------------------------------- private procedure, used internallyfunction  prepare_records(plan_cur        IN sys_refcursor,i_format_flags  IN binary_integer)return dbms_xplan_type_tablepipelined;-- private function to validate the user format (used internally)function validate_format(hasPlanStats  IN  boolean,format        IN  VARCHAR2,format_flags  OUT BINARY_INTEGER)return boolean;FUNCTION format_size(num number)RETURN varchar2;FUNCTION format_number(num number)RETURN varchar2;FUNCTION format_size2(num number)RETURN varchar2;FUNCTION format_number2(num number)RETURN varchar2;---- formats a number representing time in seconds using the format HH:MM:SS.-- This function is internal to this package--function format_time_s(num number)return varchar2;---- This is a helper function to build the XML version of the text of the-- select query that is run before the display display function to retrieve-- and display the execution plan of a SQL.-- All this function does it to wrap a given query, used to fetch a plan, by-- XML construct. The goal is to maintain ONE and SINGLE version of the XML-- format we use for the plan table.---- This function is also called by prvtspai.sql in sqltune directory.-- table_query : query to fetch plan from a plan table--FUNCTION prepare_plan_xml_query(plan_query IN VARCHAR2)                     -- query to fetch plan tableRETURN VARCHAR2;---- This function builds the xml version of an explain plan.-- The function queries the caller specified plan table and format the-- resulting plan lines into XML before returning them to the caller.---- table_name  : name of the table or view that stores the plan-- statement_id: identifier of the sql statement in the plan table-- plan_id     : identifier of the sql plan in the plan table. Currently--               used by sql replay only. SQL replay is used to produce plans--               for SQL stored in sql tuning set using plan_ids and so--               we need to be able to share the query we use to get the plans.-- format      : format of the plan output. See description in--               function display-- filter_preds: predicate to filter the content of the plan table-- plan_tag    : caller specified name of the root element in the plan xml--               tree. by default it is set to 'xplan'-- report_ref  : optional report reference. Needed only to generate--               xml of the servelet.--function build_plan_xml(table_name    in  varchar2  default 'PLAN_TABLE',statement_id  in  varchar2  default NULL,plan_id       in  number    default NULL,format        in  varchar2  default 'TYPICAL',filter_preds  in  varchar2  default NULL,plan_tag      in  varchar2  default 'plan',report_ref    in  varchar2  default NULL)return xmltype;---- This function returns an explain plan in a CLOB format.-- The function queries the caller specified plan table, generate the-- resulting plan lines into XML and then calls the XML reporting framework-- the produce and return the plan as a CLOB.---- table_name  : name of the table or view that stores the plan-- statement_id: identifier of the sql statement in the plan table-- format      : format of the plan output. See description in--               function display-- filter_preds: predicate to filter the content of the plan table-- type        : type of output. Possible values are:--               TEXT (default), HTML, ACTIVE, or XML.--function display_plan(table_name    in  varchar2  default 'PLAN_TABLE',statement_id  in  varchar2  default NULL,format        in  varchar2  default 'TYPICAL',filter_preds  in  varchar2  default NULL,type          in  varchar2  default 'TEXT')return clob;----------------------------- diff_plan_outline ---------------------------------- This function compares two sql plans generated by the given outlines-- The job is done via a SQLDiag task and the function returns the task_id---- PARAMETERS:--     sql_text              (IN)  -  text of the SQL statement--     outline1              (IN)  -  outline - for base plan--     outline2              (IN)  -  outline - for target plan--     user_name             (IN)  -  the parsing schema name--                                    default to current user---- RETURN:--     task_id: can be used to retrieve the report of findings later------------------------------------------------------------------------------function diff_plan_outline(sql_text      in  clob,outline1      in  clob,outline2      in  clob,user_name     in  varchar2 := NULL)return varchar2;----------------------------- diff_plan  ----------------------------------------- This function compares two sql plans--   reference plan: implicitly defined--   target plan:    a plan generated by the given outline---- The job is done via a SQLDiag task and the function returns the task_id---- PARAMETERS:--     sql_text          (IN)  -  text of the SQL statement--     outline           (IN)  -  used to generate the target plan--     user_name         (IN)  -  the parsing schema name--                                default to current user---- RETURN:--     task_id: can be used to retrieve the report of findings later------------------------------------------------------------------------------function diff_plan(sql_text      in  clob,outline       in  clob,user_name     in  varchar2 := NULL)return varchar2;----------------------------- diff_plan_sql_baseline ----------------------------- This function compares two given sql plans (specified via plan_names)-- The job is done via a SQLDiag task and the function returns the task_id---- PARAMETERS:--     baseline_plan_name1   (IN)  -  plan name - base--     baseline_plan_name2   (IN)  -  plan name - target---- RETURN:--     task_id: can be used to retrieve the report of findings later------------------------------------------------------------------------------function diff_plan_sql_baseline(baseline_plan_name1    in  varchar2,baseline_plan_name2    in  varchar2)return varchar2;----------------------------- diff_plan_cursor ----------------------------------- This function compares two sql plans derived from the given cursor child #-- The job is done via a SQLDiag task and the function returns the task_id---- PARAMETERS:--     sql_id                (IN)  -  sql id to specify a SQL statement--     cursor_child_num1     (IN)  -  child number - for base plan--     cursor_child_num2     (IN)  -  child number - for target plan---- RETURN:--     task_id: can be used to retrieve the report of findings later------------------------------------------------------------------------------function diff_plan_cursor(sql_id             IN   VARCHAR2,cursor_child_num1  IN   NUMBER,cursor_child_num2  IN   NUMBER)return varchar2;----------------------------- diff_plan_awr -------------------------------------- This function compares two sql plans specified by the given plan hash ids-- The job is done via a SQLDiag task and the function returns the task_id---- PARAMETERS:--     sql_id                (IN)  -  sql id to specify a SQL statement--     plan_hash_value1      (IN)  -  base plan--     plan_hash_value1      (IN)  -  target plan---- RETURN:--     task_id: can be used to retrieve the report of findings later------------------------------------------------------------------------------function diff_plan_awr(sql_id             IN   VARCHAR2,plan_hash_value1   IN   NUMBER,plan_hash_value2   IN   NUMBER)return varchar2;--++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----               ------------------------------------------                 ----                        PLAN DIFF SUPPORT FUNCTIONS                       ----               ------------------------------------------                 ----++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------- get_report_xml ---------------------------------- NAME:--     get_report_xml---- DESCRIPTION:--     This function builds the entire report in XML.---- PARAMETERS:--     report_ref        (IN)    - the report reference string that--                                 identifies this report--     tid               (IN)    - task ID--     method            (IN)    - method of comparing, eg, 'outline'-- RETURN:--     the report in XML------------------------------------------------------------------------------FUNCTION get_plandiff_report_xml(report_ref   IN VARCHAR2 := NULL,tid          IN NUMBER,method       IN VARCHAR2)RETURN XMLTYPE;end dbms_xplan;

相关文章:

Oracle DBMS_XPLAN包

DBMS_XPLAN 包的解释和关键点 DBMS_XPLAN 包是 Oracle 数据库中一个重要的工具&#xff0c;它允许数据库管理员和开发人员以各种方式显示 SQL 语句的执行计划&#xff0c;这对于 SQL 优化和性能诊断至关重要。以下是主要函数及其描述&#xff1a; 用于显示执行计划的主要函数…...

【ffmpeg命令入门】分离音视频流

文章目录 前言音视频交错存储概念为什么要进行音视频交错存储&#xff1a;为什么要分离音视频流&#xff1a; 去除音频去除视频 总结 前言 FFmpeg 是一款强大的多媒体处理工具&#xff0c;广泛应用于音视频的录制、转换和流媒体处理等领域。它支持几乎所有的音频和视频格式&am…...

小红书笔记评论采集全攻略:三种高效方法教你批量导出

摘要&#xff1a; 本文将深入探讨如何利用Python高效采集小红书平台上的笔记评论&#xff0c;通过三种实战策略&#xff0c;手把手教你实现批量数据导出。无论是市场分析、竞品监测还是用户反馈收集&#xff0c;这些技巧都将为你解锁新效率。 一、引言&#xff1a;小红书数据…...

实战:ZooKeeper 操作命令和集群部署

ZooKeeper 操作命令 ZooKeeper的操作命令主要用于对ZooKeeper服务中的节点进行创建、查看、修改和删除等操作。以下是一些常用的ZooKeeper操作命令及其说明&#xff1a; 一、启动与连接 启动ZooKeeper服务器&#xff1a; ./zkServer.sh start这个命令用于启动ZooKeeper服务器…...

linux运维一天一个shell命令之 top详解

概念&#xff1a; top 命令是 Unix 和类 Unix 操作系统&#xff08;如 Linux、macOS&#xff09;中一个常用的系统监控工具&#xff0c;它提供了一个动态的实时视图&#xff0c;显示系统的整体性能信息&#xff0c;如 CPU 使用率、内存使用情况、进程列表等。 基本用法 root…...

大模型微调:参数高效微调(PEFT)方法总结

PEFT (Parameter-Efficient Fine-Tuning) 参数高效微调是一种针对大模型微调的技术&#xff0c;旨在减少微调过程中需要调整的参数量&#xff0c;同时保持或提高模型的性能。 以LORA、Adapter Tuning 和 Prompt Tuning 为主的PEFT方法总结如下 LORA 论文题目&#xff1a;LORA:…...

Spark+实例解读

第一部分 Spark入门 学习教程&#xff1a;Spark 教程 | Spark 教程 Spark 集成了许多大数据工具&#xff0c;例如 Spark 可以处理任何 Hadoop 数据源&#xff0c;也能在 Hadoop 集群上执行。大数据业内有个共识认为&#xff0c;Spark 只是Hadoop MapReduce 的扩展&#xff08…...

WPF多语言国际化,中英文切换

通过切换资源文件的形式实现中英文一键切换 在项目中新建Language文件夹&#xff0c;添加资源字典&#xff08;xaml文件&#xff09;&#xff0c;中文英文各一个。 在资源字典中写上想中英文切换的字符串&#xff0c;需要注意&#xff0c;必须指定key值&#xff0c;并且中英文…...

Halcon深度学习分类模型

1.Halcon20之后深度学习支持CPU训练模型&#xff0c;没有money买显卡的小伙伴有福了。但是缺点也很明显&#xff0c;就是训练速度超级慢&#xff0c;推理效果也没有GPU好&#xff0c;不过学习用足够。 2.分类模型是Halcon深度学习最简单的模型&#xff0c;可以用在物品分类&…...

洗地机哪种牌子好?洗地机排行榜前十名公布

洗地机市场上品牌琳琅满目&#xff0c;每个品牌都有其独特的魅力和优势。消费者在选择时&#xff0c;往往会根据自己的实际需求、预算以及对产品性能的期望来做出决策。因此&#xff0c;无论是哪个品牌的洗地机&#xff0c;只要能够满足用户的清洁需求&#xff0c;提供便捷的操…...

C++中的虚函数与多态机制如何工作?

在C中&#xff0c;虚函数和多态机制是实现面向对象编程的重要概念。 虚函数是在基类中声明的函数&#xff0c;可以在派生类中进行重写。当基类的指针或引用指向派生类的对象时&#xff0c;通过调用虚函数可以实现动态绑定&#xff0c;即在运行时确定要调用的函数。 多态是指通…...

《LeetCode热题100》---<哈希三道>

本篇博客讲解 LeetCode热题100道中的哈希篇中的三道题。分别是 1.第一道&#xff1a;两数之和&#xff08;简单&#xff09; 2.第二道&#xff1a;字母异位词分组&#xff08;中等&#xff09; 3.第三道&#xff1a;最长连续序列&#xff08;中等&#xff09; 第一道&#xff1…...

秒懂C++之string类(下)

目录 一.接口说明 1.1 erase 1.2 replace&#xff08;最好别用&#xff09; 1.3 find 1.4 substr 1.5 rfind 1.6 find_first_of 1.7 find_last_of 二.string类的模拟实现 2.1 构造 2.2 无参构造 2.3 析构 2.4.【】运算符 2.5 迭代器 2.6 打印 2.7 reserve扩容 …...

github简单地操作

1.调节字体大小 选择options 选择text 选择select 选择你需要的参数就可以了。 2.配置用户名和邮箱 桌面右键&#xff0c;选择git Bash Here git config --global user.name 用户名 git config --global user.email 邮箱名 3.用git实现代码管理的过程 下载别人的项目 git …...

模型改进-损失函数合集

模版 第一步在哪些地方做出修改&#xff1a; 228行 self.use_wiseiouTrue 230行 self.wiou_loss WiseIouLoss(ltypeMPDIoU, monotonousFalse, inner_iouTrue, focaler_iouFalse) 238行 wiou self.wiou_loss(pred_bboxes[fg_mask], target_bboxes[fg_mask], ret_iouFalse…...

C++模板(初阶)

1.引入 在之前的笔记中有提到&#xff1a;函数重载&#xff08;特别是交换函数&#xff08;Swap&#xff09;的实现&#xff09; void Swap(int& left, int& right) {int temp left;left right;right temp; } void Swap(double& left, double& right) {do…...

下面关于Date类的描述错误的一项是?

下面关于Date类的描述错误的一项是&#xff1f; A. java.util.Date类下有三个子类&#xff1a;java.sql.Date、java.sql.Timestamp、java.sql.Time&#xff1b; B. 利用SimpleDateFormat类可以对java.util.Date类进行格式化显示&#xff1b; C. 直接输出Date类对象就可以取得日…...

【Python面试题收录】Python编程基础练习题①(数据类型+函数+文件操作)

本文所有代码打包在Gitee仓库中https://gitee.com/wx114/Python-Interview-Questions 一、数据类型 第一题&#xff08;str&#xff09; 请编写一个Python程序&#xff0c;完成以下任务&#xff1a; 去除字符串开头和结尾的空格。使用逗号&#xff08;","&#…...

C# Nmodbus,EasyModbusTCP读写操作

Nmodbus读写 两个Button控件分别为 读取和写入 分别使用控件的点击方法 ①引用第三方《NModbus4》2.1.0版本 全局 public SerialPort port new SerialPort("COM2", 9600, Parity.None, 8, (StopBits)1); ModbusSerialMaster master; public Form1() port.Open();…...

spark常用参数调优

目录 1.set spark.grouping.sets.reference.hivetrue;2.set spark.locality.wait.rack0s3.set spark.locality.wait0s;4.set spark.executor.memoryOverhead 2G;5.set spark.sql.shuffle.partitions 1000;6.set spark.shuffle.file.buffer 256k7. set spark.reducer.maxSizeInF…...

C#/WinFrom TCP通信+ 网线插拔检测+客服端异常掉线检测

Winfor Tcp通信(服务端) 今天给大家讲一下C# 关于Tcp 通信部分&#xff0c;这一块的教程网上一大堆&#xff0c;不过关于掉网&#xff0c;异常断开连接的这部分到是到是没有多少说明&#xff0c;有方法 不过基本上最多的两种方式&#xff08;1.设置一个超时时间&#xff0c;2.…...

一篇文章掌握Python爬虫的80%

转载&#xff1a;一篇文章掌握Python爬虫的80% Python爬虫 Python 爬虫技术在数据采集和信息获取中有着广泛的应用。本文将带你掌握Python爬虫的核心知识&#xff0c;帮助你迅速成为一名爬虫高手。以下内容将涵盖爬虫的基本概念、常用库、核心技术和实战案例。 一、Python 爬虫…...

【用户会话信息在异步事件/线程池的传递】

用户会话信息在异步事件/线程池的传递 author:shengfq date:2024-07-29 version:1.0 背景: 同事写的一个代码功能,是在一个主线程中通过如下代码进行异步任务的执行,结果遇到了问题. 1.ThreadPool.execute(Runnable)启动一个子线程执行异步任务 2.applicationContext.publis…...

Java8: BigDecimal

Java8:BigDecimal 转两位小数的百分数-CSDN博客 BigDecimal 先做除法 然后取绝对值 在Java 8中&#xff0c;如果你想要对一个BigDecimal值进行除法操作&#xff0c;并随后取其绝对值&#xff0c;你可以通过组合divide方法和abs方法来实现这一目的。不过&#xff0c;需要注意的…...

苹果推送iOS 18.1带来Apple Intelligence预览

&#x1f989; AI新闻 &#x1f680; 苹果推送iOS 18.1带来Apple Intelligence预览 摘要&#xff1a;苹果向iPhone和iPad用户推送iOS 18.1和iPadOS 18.1开发者预览版Beta更新&#xff0c;带来“Apple Intelligence”预览。目前仅支持M1芯片或更高版本的设备。Apple Intellige…...

testRigor-基于人工智能驱动的无代码自动化测试平台

1、testRigor介绍 简单来说&#xff0c;testRigor是一款基于人工智能驱动的无代码自动化测试平台&#xff0c;它能够通过分析应用的行为模式&#xff0c;智能地生成测试用例&#xff0c;并自动执行这些测试&#xff0c;无需人工编写测试脚本。可以用于Web、移动、API和本机桌面…...

hadoop学习(一)

一.hadoop概述 1.1hadoop优势 1&#xff09;高可靠性&#xff1a;Hadoop底层维护多个数据副本&#xff0c;即使Hadoop某个计算元素或存储出现故障&#xff0c;也不会导致数据的丢失。 2&#xff09;高扩展性&#xff1a;在集群间分配任务数据&#xff0c;可方便扩展数以千计…...

Linux性能监控:sar的可视化方案

在当今的IT环境中&#xff0c;系统性能监控是确保应用程序稳定运行和快速响应问题的关键。Linux作为一种广泛使用的操作系统&#xff0c;拥有多种性能监控工具&#xff0c;其中sar&#xff08;System Activity Reporter&#xff09;因其全面性和灵活性被广泛采用。然而&#xf…...

如何录制电脑屏幕视频,5招让您成为电脑录制高手

在今天&#xff0c;屏幕录制成为每个电脑使用者都应掌握的基础技能。不论是教学分享、会议记录还是游戏直播&#xff0c;屏幕录制都能帮你捕捉那些重要的瞬间&#xff0c;将无形的信息转化为有形的视频。那么&#xff0c;如何录制电脑屏幕视频呢&#xff1f;今天&#xff0c;我…...

AI届的新宠:小语言模型(SLM)?

大语言模型&#xff08;LLM&#xff09;在过去几年产生了巨大影响&#xff0c;特别是随着OpenAI的ChatGPT的出现&#xff0c;各种大语言模型如雨后春笋般出现&#xff0c;国内如KimiChat、通义千问、文心一言和智谱清言等。 然而&#xff0c;大语言模型通常拥有庞大的参数&…...

PMP模拟题错题本

模拟题A 错题整理 项目经理为一个具有按时完成盈利项目历史记录的组织工作。然而&#xff0c;由于缺乏相关方的支持以及他们未能提供信息&#xff0c;这些项目都经历过问题。若要避免这些问题&#xff0c;项目经理在新项目开始时应该做什么&#xff1f; A. 在启动阶段识别关键…...

Laravel Dusk:点亮自动化测试的明灯

Laravel Dusk&#xff1a;点亮自动化测试的明灯 在Web开发中&#xff0c;确保应用程序的用户体验和功能正确性至关重要。Laravel Dusk是一个强大的浏览器自动化测试工具&#xff0c;它允许开发者模拟用户与应用程序的交互&#xff0c;从而进行端到端的测试。本文将深入探讨Lar…...

Git、Gitlab以及分支管理

分布式版本控制系统 一、Git概述 Git是一种分布式版本控制系统&#xff0c;用于跟踪和管理代码的变更。它由Linus torvalds创建的&#xff0c;最初被设计用于Linux内核的开发。Git 允许开发人员跟踪和管理代码的版本&#xff0c;并且可以在不同的开发人员之间进行协作。 Githu…...

TCP/IP 协议栈介绍

TCP/IP 协议栈介绍 1. 引言 TCP/IP&#xff08;传输控制协议/互联网协议&#xff09;是一组用于数据网络中通信的协议集合&#xff0c;它是互联网的基础。本文将详细介绍TCP/IP协议栈的各个层次、工作原理以及其在网络通信中的作用。 2. TCP/IP 协议栈的层次结构 TCP/IP协议…...

香橙派orangepi系统没有apt,也没有apt-get,也没有yum命令,找不到apt、apt-get、yum的Linux系统

以下是一个关于如何在 Orange Pi 上的 Arch Linux 系统中发现缺失包管理器的问题并解决的详细教程。 发现问题 确认系统类型&#xff1a; 使用以下命令检查当前的 Linux 发行版&#xff1a; uname -a cat /etc/os-release如果你看到类似于 “Arch Linux” 的信息&#xff0c;说…...

在invidia jetpack4.5.1上运行c++版yolov8(tensorRT)

心路历程&#xff08;可略过&#xff09; 为了能在arm64上跑通yolov8&#xff0c;我试过很多很多代码&#xff0c;太多对库版本的要求太高了&#xff1b; 比如说有一个是需要依赖onnx库的&#xff0c;&#xff08;https://github.com/UNeedCryDear/yolov8-opencv-onnxruntime-…...

Vue3 接入 i18n 实现国际化多语言

在 Vue.js 3 中实现网页的国际化多语言&#xff0c;最常用的包是 vue-i18n。 第一步&#xff0c;安装一个 Vite 下使用 <i18n> 标签的插件&#xff1a;unplugin-vue-i18n npm install unplugin-vue-i18n # 或 yarn add unplugin-vue-i18n 安装完成后&#xff0c;调整 v…...

深度学习环境坑。

前面装好了之后装pytorch之后老显示gpufalse。 https://www.jb51.net/article/247762.htm 原因就是清华源的坑。 安装的时候不要用conda&#xff0c; 用pip命令 我cuda12.6&#xff0c;4070s cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip cuda_12.5.1_555.85_windows.…...

LLM——10个大型语言模型(LLM)常见面试题以及答案解析

今天我们来总结以下大型语言模型面试中常问的问题 1、哪种技术有助于减轻基于提示的学习中的偏见? A.微调 Fine-tuning B.数据增强 Data augmentation C.提示校准 Prompt calibration D.梯度裁剪 Gradient clipping 答案:C 提示校准包括调整提示&#xff0c;尽量减少产生…...

MongoDB - 聚合阶段 $count、$skip、$project

文章目录 1. $count 聚合阶段2. $skip 聚合阶段3. $project 聚合阶段1. 包含指定字段2. 排除_id字段3. 排除指定字段4. 不能同时指定包含字段和排除字段5. 排除嵌入式文档中的指定字段6. 包含嵌入式文档中的指定字段7. 添加新字段8. 重命名字段 1. $count 聚合阶段 计算匹配到…...

如何获取文件缩略图(C#和C++实现)

在C中&#xff0c;可以有以下两种办法 使用COM接口IThumbnailCache 文档链接&#xff1a;IThumbnailCache (thumbcache.h) - Win32 apps | Microsoft Learn 示例代码如下&#xff1a; VOID GetFileThumbnail(PCWSTR path) {HRESULT hr CoInitialize(nullptr);IShellItem* i…...

create-vue项目的README中文版

使用方法 要使用 create-vue 创建一个新的 Vue 项目&#xff0c;只需在终端中运行以下命令&#xff1a; npm create vuelatest[!注意] (latest 或 legacy) 不能省略&#xff0c;否则 npm 可能会解析到缓存中过时版本的包。 或者&#xff0c;如果你需要支持 IE11&#xff0c;你…...

Centos 7系统(最小化安装)安装Git 、git-man帮助、补全git命令-详细文章

安装之前由于是最小化安装centos7安装一些开发环境和工具包 文章使用国内阿里源 cd /etc/yum.repos.d/ && mkdir myrepo && mv * myrepo&&lscurl -O https://mirrors.aliyun.com/repo/epel-7.repo;curl -O https://mirrors.aliyun.com/repo/Centos-7…...

Golang零基础入门课_20240726 课程笔记

视频课程 最近发现越来越多的公司在用Golang了&#xff0c;所以精心整理了一套视频教程给大家&#xff0c;这个只是其中的第一部&#xff0c;后续还会有很多。 视频已经录制完成&#xff0c;完整目录截图如下&#xff1a; 课程目录 01 第一个Go程序.mp402 定义变量.mp403 …...

杂记-镜像

-i https://pypi.tuna.tsinghua.edu.cn/simple 清华 pip intall 出现 error: subprocess-exited-with-error 错误的解决办法———————————pip install --upgrade pip setuptools57.5.0 ————————————————————————————————————…...

如何将WordPress文章中的外链图片批量导入到本地

在使用采集软件进行内容创作时&#xff0c;很多文章中的图片都是远程链接&#xff0c;这不仅会导致前端加载速度慢&#xff0c;还会在微信小程序和抖音小程序中添加各种域名&#xff0c;造成管理上的麻烦。特别是遇到没有备案的外链&#xff0c;更是让人头疼。因此&#xff0c;…...

primetime如何合并不同modes的libs到一个lib文件

首先&#xff0c;用primetime 抽 timing model 的指令如下。 代码如下&#xff08;示例&#xff09;&#xff1a; #抽lib时留一些margin, setup -max/hold -min set_extract_model_margin -port [get_ports -filter "!defined(clocks)"] -max 0.1 #抽lib extract_mod…...

【运维笔记】数据库无法启动,数据库炸后备份恢复数据

事情起因 在做docker作业的时候&#xff0c;把卷映射到了宿主机原来的mysql数据库目录上&#xff0c;宿主机原来的mysql版本为8.0&#xff0c;docker容器版本为5.6&#xff0c;导致翻车。 具体操作 备份目录 将/var/lib/mysql备份到~/mysql_backup&#xff1a;cp /var/lib/…...

成功解决:java.security.InvalidKeyException: Illegal key size

在集成微信支付到Spring Boot项目时&#xff0c;可能会遇到启动报错 java.security.InvalidKeyException: Illegal key size 的问题。这是由于Java加密扩展&#xff08;JCE&#xff09;限制了密钥的长度。幸运的是&#xff0c;我们可以通过简单的替换文件来解决这个问题。 解决…...

微服务事务管理(分布式事务问题 理论基础 初识Seata XA模式 AT模式 )

目录 一、分布式事务问题 1. 本地事务 2. 分布式事务 3. 演示分布式事务问题 二、理论基础 1. CAP定理 1.1 ⼀致性 1.2 可⽤性 1.3 分区容错 1.4 ⽭盾 2. BASE理论 3. 解决分布式事务的思路 三、初识Seata 1. Seata的架构 2. 部署TC服务 3. 微服务集成Se…...