=====================START====================================

闲来无事,看了下数据库跑的long running sql,

SQL> /

1708      51125          1 61jv5qy7mandd      10622 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   db file scattered read

382      22079          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

5       9223          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

70      62839          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

139        299          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

202      23755          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

203        541          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

260      38107          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

322      13893          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

324      27407          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

454         75          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

515        199          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

638       6453          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

705       1439          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

764        613          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

1896      35227          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

2152      43367          1 61jv5qy7mandd      10621 infaadm                        inf-p-va-01.va2.b2c.nike.com

DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

pmdtm@inf-p-va-01.va2.b2c.nike.com (TNS V1-V3)                   PX Deq: Table Q Normal

看到这条delete语句跑了3hours左右,于是想看看为啥跑这么慢,因为从v$session查出来的这句sql是有很多sid的,说明有很多session,开了并行在delete,那为何还跑得这么慢。

并且得看看并行hint在语句中我没看到,是表的并行还是应用连过来设的并行还是什么?

先大致分析下:

Sql text:DELETE FROM FINOPRPT.FIN_ORD_DTL WHERE ORD_LIN_ID IN (SELECT ORD_LIN_ID FROM FINOPSTG.ORDER_LINE_FINRPT_STG)

SQL> SELECT px.QCSID,px.SID "SID", p.PID, p.SPID "SPID", px.INST_ID "Inst",s.status,s.username,s.machine,to_char(logon_time,'yyyymmdd hh24:mi:ss')  as loggon_time,s.last_call_et,

2         px.SERVER_GROUP "Group", px.SERVER_SET "Set",

3      px.DEGREE "Degree", px.REQ_DEGREE "Req Degree", w.event "Wait Event"

FROM GV$SESSION s, GV$PX_SESSION px, GV$PROCESS p, GV$SESSION_WAIT w

WHERE s.sid (+) = px.sid AND s.inst_id (+) = px.inst_id AND

s.sid = w.sid (+) AND s.inst_id = w.inst_id (+) AND

s.paddr = p.addr (+) AND s.inst_id = p.inst_id (+) and px.qcsid=1708

ORDER BY DECODE(px.QCINST_ID,  NULL, px.INST_ID,  px.QCINST_ID), px.QCSID,

DECODE(px.SERVER_GROUP, NULL, 0, px.SERVER_GROUP), px.SERVER_SET, px.INST_ID;  4    5    6    7    8    9

QCSID        SID        PID SPID                           Inst STATUS   USERNAME                       MACHINE                                                    LOGGON_TIME        LAST_CALL_ET      Group        Set     Degree Req Degree Wait Event

---------- ---------- ---------- ------------------------ ---------- -------- ------------------------------ ---------------------------------------------------------------- ----------------- ------------ ---------- ---------- ---------- ---------- ----------------------------------------------------------------

1708       1708         75 25545                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:23        11875                                              db file scattered read

1708        139         50 3991                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        202         51 3993                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        260         52 3995                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        322         53 3997                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        382         54 3999                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        454         55 4001                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708          5         48 3987                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708         70         49 3989                              1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        764        108 25561                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        705        107 25559                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        638        106 25557                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        515        104 25555                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        324        101 25553                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708        203         99 25551                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708       2152         82 25549                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708       1896         78 25547                             1 ACTIVE   INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          1         16         48 PX Deq: Table Q Normal

1708       2211        131 6265                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       2397        134 6271                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1022        112 6203                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1078        113 6205                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1142        114 6207                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1202        115 6214                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1266        116 6226                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       2155        130 6263                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708        574        105 6257                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1963        127 6255                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708        387        102 6243                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1898        126 6253                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1835        125 6251                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1767        124 6249                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       1333        117 6233                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

1708       2276        132 6267                              1 INACTIVE INFA_USR                       inf-p-va-01.va2.b2c.nike.com                               20161217 09:30:24        11874           1          2         16         48 PX Deq: Execution Msg

33 rows selected.

看下执行计划,把in语句转换成hash join right semi操作,这样相当于两张表做hash join了,表的获取是走全表扫描和Fast full ind scan,这两个操作正好都能充分利用并行进程。

所以执行计划暂时没看出有啥毛病。

Plan hash value: 1653143170

-------------------------------------------------------------------------------------------------------------------------------------

| Id  | Operation                   | Name                     | Rows  | Bytes | Cost (%CPU)| Time     |    TQ  |IN-OUT| PQ Distrib |

-------------------------------------------------------------------------------------------------------------------------------------

|   0 | DELETE STATEMENT            |                          |       |       |   349K(100)|          |        |      |            |

|   1 |  DELETE                     | FIN_ORD_DTL              |       |       |            |          |        |      |            |

|   2 |   PX COORDINATOR            |                          |       |       |            |          |        |      |            |

|   3 |    PX SEND QC (RANDOM)      | :TQ10002                 |  5950K|   283M|   349K  (1)| 02:14:00 |  Q1,02 | P->S | QC (RAND)  |

|*  4 |     HASH JOIN RIGHT SEMI    |                          |  5950K|   283M|   349K  (1)| 02:14:00 |  Q1,02 | PCWP |            |

|   5 |      PX RECEIVE             |                          |  5950K|   141M|  6476   (1)| 00:02:29 |  Q1,02 | PCWP |            |

|   6 |       PX SEND HASH          | :TQ10001                 |  5950K|   141M|  6476   (1)| 00:02:29 |  Q1,01 | P->P | HASH       |

|   7 |        PX BLOCK ITERATOR    |                          |  5950K|   141M|  6476   (1)| 00:02:29 |  Q1,01 | PCWC |            |

|*  8 |         INDEX FAST FULL SCAN| ORDER_LINE_FINRPT_STG_I3 |  5950K|   141M|  6476   (1)| 00:02:29 |  Q1,01 | PCWP |            |

|   9 |      BUFFER SORT            |                          |       |       |            |          |  Q1,02 | PCWC |            |

|  10 |       PX RECEIVE            |                          |    40M|   969M|   342K  (1)| 02:11:28 |  Q1,02 | PCWP |            |

|  11 |        PX SEND HASH         | :TQ10000                 |    40M|   969M|   342K  (1)| 02:11:28 |        | S->P | HASH       |

|  12 |         TABLE ACCESS FULL   | FIN_ORD_DTL              |    40M|   969M|   342K  (1)| 02:11:28 |        |      |            |

-------------------------------------------------------------------------------------------------------------------------------------

Query Block Name / Object Alias (identified by operation id):

-------------------------------------------------------------

1 - SEL$3BA1AD7C

8 - SEL$3BA1AD7C / ORDER_LINE_FINRPT_STG@SEL$1

12 - SEL$3BA1AD7C / FIN_ORD_DTL@DEL$1

Predicate Information (identified by operation id):

---------------------------------------------------

4 - access("ORD_LIN_ID"="ORD_LIN_ID")

8 - access(:Z>=:Z AND :Z<=:Z)

select table_name, owner,num_rows, blocks, last_analyzed,partitioned

from dba_tables

where table_name in ('FIN_ORD_DTL', 'ORDER_LINE_FINRPT_STG');

TABLE_NAME                     OWNER                            NUM_ROWS     BLOCKS LAST_ANAL PAR

------------------------------ ------------------------------ ---------- ---------- --------- ---

ORDER_LINE_FINRPT_STG          FINOPSTG                          5950720     608238 11-DEC-16 NO

FIN_ORD_DTL                    FINOPRPT                         40662196    1702912 24-AUG-16 NO

其实两张表join,正常并行全表扫描+并行index fast full index scan会很快,五分钟左右能完成,不至于跑3hours还没结束。

SQL> ho date

Sat Dec 17 13:09:09 UTC 2016

为什么执行计划有并行,实际一直都是单线程工作,因为从如下OEM可以看到sql从开始跑的时候就一直是单线程工作,

为什么gv$session看到了有parallel processes,执行计划也是并行操作,而OEM看到的其实一直都是单线程,并没有并行

先来看看表的并行度: select table_name,degree from dba_tables where table_name in ('FIN_ORD_DTL', 'ORDER_LINE_FINRPT_STG');

TABLE_NAME                     DEGREE

------------------------------ ----------------------------------------

FIN_ORD_DTL                                         1

ORDER_LINE_FINRPT_STG                   1

在sql级别没有加parallel hint,在表级别degree也是1,那么并行是哪里来的?

并行度可以通过以下三种方式来设定:

1、使用Hint 指定并行度。

2、使用alter session force parallel 设定并行度。

3、使用SQL中引用的表或者索引上设定的并行度,原则上Oracle 使用这些对象中并行度最高的那个值作为当前执行的并行度。

三种方式任意一种就可以使并行生效,如果多种方式同时存在的话,则优先级顺序是:hint -> alter session -> table/index degree

那么这个并行出现的可能性只有两种了:

  1. 应用连过来设的session级别的并行度
  2. V$session及执行计划的’缺陷’

另外自己还看了下数据库设置的parallel相关参数,对如下这个参数关注了一下,

https://docs.oracle.com/cd/E18283_01/server.112/e16541/parallel005.htm

PARALLEL_FORCE_LOCAL

This parameter specifies whether a SQL statement executed in parallel is restricted to a single instance in an Oracle RAC environment. By setting this parameter to TRUE, you restrict the scope of the parallel server processed to the single Oracle RAC instance where the query coordinator is running.

The recommended value for the PARALLEL_FORCE_LOCAL parameter is FALSE.

这个参数在BI库里设成false,就是说BI 6个节点,即使我在node3上sql开了并行,也仅限于node3上,不会借助其他node(这个参数在这个案例没啥影响,只是捎带提下)

PARALLEL_DEGREE_POLICY

PARALLEL_DEGREE_POLICY specifies whether or not automatic degree of
Parallelism, statement queuing, and in-memory parallel execution will be enabled.Values:

  • MANUAL: Disables automatic degree of parallelism, statement
    queuing, and in-memory parallel execution. This reverts the behavior of
    parallel execution to what it was prior to Oracle Database 11g Release 2
    (11.2). This is the default.
  • LIMITED: Enables automatic degree of parallelism for some
    statements but statement queuing and in-memory Parallel Execution are disabled.
    Automatic degree of parallelism is only applied to those statements that access
    tables or indexes decorated explicitly with the DEFAULT degree of parallelism
    using the PARALLEL clause. Statements that do not access any tables or indexes
    decorated with the DEFAULT degree of parallelism will retain the MANUAL
    behavior.
  • AUTO: Enables automatic degree of parallelism, statement queuing,
    and in-memory parallel execution.

生产的参数如下:

parallel_degree_policy               string      MANUAL

parallel_force_local                 boolean     TRUE

看了下跟数据库的参数设置也没关系。

所以接下来的思路,或者办法就是:

跟应用确认,是不是session级别设置的,要么没设置,那么v$session和执行计划的信息就是错的,要么设置了,那么为什么一直是单线程工作了,在这里是可以用到并行去做table
full scan和index
fast full scan这两个操作的,那么可以分析下并行的资源是不是够,当时自己没想到这一点,可能并行资源全都in use了!这是目前唯一能想出来的原因了。

所以以后分析的时候还顺便分析下并行的资源使用

SELECT * FROM
V$PX_PROCESS;可以看到还有多少available的parallel process

select * from V$PX_PROCESS_SYSSTAT;也可以看

当然后续的文章还会说明下关于并行的consumer/producer模型,parallel wait event等知识。

======================ENDED========================================

delete语句跑了3个小时分析以及关于并行的一些知识的更多相关文章

  1. MySQL DELETE语句和TRUNCATE TABLE语句的区别

    MySQL DELETE语句和TRUNCATE TABLE语句的区别 2010-10-08 16:05 佚名 互联网 字号:T | T 在MySQL数据库中,DELETE语句和TRUNCATE TAB ...

  2. Sql Server系列:Delete语句

    数据的删除将删除表的部分或全部记录,删除时可以指定删除条件从而删除一条或多条记录.如果不指定删除条件,DELETE语句将删除表中全部的记录,清空数据表. 1 DELETE语法 [ WITH <c ...

  3. SQL DELETE 语句

    DELETE 语句用于删除表中的行. 语法 DELETE FROM 表名称 WHERE 列名称 = 值 Person: LastName FirstName Address City Gates Bi ...

  4. FP 某段SQL语句执行时间超过1个小时,并报错:ORA-01652: 无法通过 128 (在表空间 TEMPSTG 中) 扩展

    一.出现如下两个错误:1.某一段SQL语句执行时间超过1个小时:2.一个小时后,提示如下错误:ORA-01652: 无法通过 128 (在表空间 TEMPSTG 中) 扩展 temp 段ORA-065 ...

  5. 如何判断一条sql(update,delete)语句是否执行成功

    如何判断一条sql(update,delete)语句是否执行成功 catch  (SQLException    e)  {  }  catch不到错误应该就成功了.   ============== ...

  6. mysql 事务是专门用来管理insert,update,delete语句的,和select语句一点不相干

    1.mysql 事务是专门用来管理insert,update,delete语句的,和select语句一点不相干 2.一般来说,事务是必须满足4个条件(ACID): Atomicity(原子性).Con ...

  7. delete语句与reference约束 FK_subplan_job_id冲突问题,导致job无法删除解决办法

    在SQL Server 2008上删除已运行维护计划后,维护计划job没有自动删除掉,手工再删除维护计划job,提示删除失败. 错误现象:delete  语句与 reference 约束"F ...

  8. 删除作业计划出错(DELETE语句与 REFERENCE约束"FK_subplan_job_id"冲突。)

    删除作业计划出错(DELETE语句与 REFERENCE约束"FK_subplan_job_id"冲突.) use msdb select * from sysmaintplan_plans --查看 ...

  9. oracle数据库删除数据Delete语句和Truncate语句的对比

    oracle数据库删除数据Delete语句和Truncate语句的对比 当表中的数据不需要时,则应该删除该数据并释放所占用的空间,删除表中的数据可以使用Delete语句或者Truncate语句,下面分 ...

随机推荐

  1. C语言 第四章 分支结构练习

    一.输入语文,数学成绩,根据平均分分3档 #include "stdio.h" void main() { //接受用户输入 float chinese,math,avg; pri ...

  2. Oracle Database Server 'TNS Listener'远程数据投毒漏洞(CVE-2012-1675)解决

    环境:Windows 2008 R2 + Oracle 10.2.0.3 应用最新bundle patch后,扫描依然报出漏洞 Oracle Database Server 'TNS Listener ...

  3. DotNet中几种常用的加密算法

    在.NET项目中,我们较多的使用到加密这个操作.因为在现代的项目中,对信息安全的要求越来越高,那么多信息的加密就变得至关重要.现在提供几种常用的加密/解密算法. 1.用于文本和Base64编码文本的互 ...

  4. 【集合框架】JDK1.8源码分析之LinkedHashMap(二)

    一.前言 前面我们已经分析了HashMap的源码,已经知道了HashMap可以用在哪种场合,如果这样一种情形,我们需要按照元素插入的顺序来访问元素,此时,LinkedHashMap就派上用场了,它保存 ...

  5. js构建ui的统一异常处理方案(二)

    上一篇文章,我分析了同步代码做异常处理是基于责任链模式,而通过try.catch等语句可以很容易地实现这种责任链模式.但是如果是异步调用,我们无法直接通过try.catch语句实现责任链模式,并且通过 ...

  6. C++作用域

    作用域通常和变量捆绑在一起,限定了变量可用范围,同时也规定了变量的生命周期:何时创建.何时销毁.作用域通常分为:全局作用域和局部作用域. 全局作用域(全局变量) 在所用函数体外部定义的变量就是全局变量 ...

  7. mybatis入门基础(五)----动态SQL

    一:动态SQL 1.1.定义 mybatis核心对sql语句进行灵活操作,通过表达式进行判断,对sql进行灵活拼接.组装. 1.2.案例需求 用户信息综合查询列表这个statement的定义使用动态s ...

  8. Chrome开发者工具详解(5)-Application、Security、Audits面板

    Chrome开发者工具详解(5)-Application.Security.Audits面板 这篇文章是Chrome开发者工具详解这一系列的最后一篇,介绍DevTools最后的三个面板功能-Appli ...

  9. 记一个简单的sql查询

    在我们做各类统计和各类报表的时候,会有各种各样的查询要求.条件 这篇主要记录一个常见的统计查询 要求如下: 统计一段时间内,每天注册人数,如果某天没有人注册则显示为0 现在建个简单的表来试试 建表语句 ...

  10. [System] CentOS虚拟机系统克隆后的网络配置

    VMware Workstation 虚拟机在进行克隆 CentOS 系统之后,在克隆机上配置网卡时,会出现一些细节问题,讨论一二. 一.情景描述 克隆机上默认由 NetworkManager 服务管 ...