찾다
데이터 베이스MySQL 튜토리얼绑定变量窥视是否开启和直方图关系

绑定变量窥视是否开启和直方图关系

Jun 07, 2016 pm 04:39 PM
관계변하기 쉬운켜다히스토그램제본

如果有直方图信息,而且绑定变量窥视也开启了,这里我们很好理解,在oracle 9i和oracle 10g时,sql第一次执行会将绑定变量的值带入到sql中,然后根据直方图等统计信息来评估合理的执行计划,在同样的sql下次执行时,会直接使用之前的执行计划,这个也就是我

如果有直方图信息,而且绑定变量窥视也开启了,这里我们很好理解,在oracle 9i和oracle 10g时,sql第一次执行会将绑定变量的值带入到sql中,然后根据直方图等统计信息来评估合理的执行计划,在同样的sql下次执行时,会直接使用之前的执行计划,这个也就是我们经常所接触的绑定变量窥视。

1) 开启了绑定变量窥视,收集该列的直方图:
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL> alter system set "_optim_peek_user_binds"=true;

System altered.

SQL> create table t002 as select * from dba_objects;

Table created.

SQL> update t002 set object_id=100 where rownum
49999 rows updated.

SQL> commit;

Commit complete.

SQL> execute dbms_stats.gather_table_stats(ownname=>'XIAOYU',tabname=>'T002',met
hod_opt=>'for all columns size 254');

PL/SQL procedure successfully completed.

SQL> select num_rows,blocks from user_tables where table_name='T002';

  NUM_ROWS     BLOCKS
---------- ----------
     50328        712

SQL> select num_distinct,density,num_nulls from user_tab_columns where table_nam
e='T002' and column_name='OBJECT_ID';

NUM_DISTINCT    DENSITY  NUM_NULLS
------------ ---------- ----------
          29 9.8243E-06          0

SQL> variable x number;
SQL> exec : x:=100;

PL/SQL procedure successfully completed.

SQL> select count(*) from t002 where object_id=:x;

  COUNT(*)
----------
     49999
SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  4yqsqnawx85ty, child number 0
-------------------------------------
select count(*) from t002 where object_id=:x

Plan hash value: 3014849763

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   158 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |     4 |            |          |
|*  2 |   TABLE ACCESS FULL| T002 | 50065 |   195K|   158   (1)| 00:00:02 |
---------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T002@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------
   2 - filter("OBJECT_ID"=:X)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT(*)[22]

30 rows selected.

SQL> exec : x:=1;

PL/SQL procedure successfully completed.

SQL> select count(*) from t002 where object_id=:x;

  COUNT(*)
----------
         0

SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  4yqsqnawx85ty, child number 0
-------------------------------------
select count(*) from t002 where object_id=:x

Plan hash value: 3014849763

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   158 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |     4 |            |          |
|*  2 |   TABLE ACCESS FULL| T002 | 50065 |   195K|   158   (1)| 00:00:02 |
---------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T002@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------
   2 - filter("OBJECT_ID"=:X)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT(*)[22]

30 rows selected.

这里比较好理解,由于开启了绑定变量窥视,然后该列又有直方图信息,所以第一次执行时会把具体值带入,然后根据具体值的直方图信息来评估rows,这里的通过谓词过滤后估算返回的rows是50065,关于有直方图的情况下估算rows的方式,非常复杂,小鱼自己也没有过多的深究,后面有机会整理相应的文章来分享。

2)如果开启了绑定变量窥视,但是没有收集直方图:
SQL> alter system set "_optim_peek_user_binds"=true;

System altered.

SQL> execute dbms_stats.gather_table_stats(ownname=>'XIAOYU',tabname=>'T002',met
hod_opt=>'for all columns size 1');

PL/SQL procedure successfully completed.

SQL>variable y number;
SQL>exec : y:=100

PL/SQL procedure successfully completed

SQL> select count(*) from t002 where object_id=:y;

  COUNT(*)
----------
     49999

SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------

SQL_ID  86ngbvm962n14, child number 0
-------------------------------------
select count(*) from t002 where object_id=:y

Plan hash value: 3014849763

--------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   158 (100)|
|   1 |  SORT AGGREGATE    |      |     1 |     4 |            |
|*  2 |   TABLE ACCESS FULL| T002 |  1290 |  5160 |   158   (1)| 00:00:02
--------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T002@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter("OBJECT_ID"=:Y)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT(*)[22]

30 rows selected.

这里我们来算算这个rows 1290是如何估算出来的

这里介绍最简单的如何计算rows,selectivity、density的公式:(下列计算公式在该列没有直方图前提下)

小鱼之前介绍cbo优化器的基本知识里面提过一个selectivity可选择率这个概念

可选择率selectivity=释放指定谓词条件返回结果集的记录数/未施加任何谓词条件的原始结果集的记录数,可选择率越大,那么cbo估算返回的rows也越大。

那么集的势rows=selectivity*未施加任何谓词条件的原始结果集的记录数

那么这个可选择率selectivity如何计算了,在列的统计信息中num_nulls为0时,selectivity=1/num_distinct

SQL> select num_distinct,num_nulls,density,num_buckets from dba_tab_columns wher
e table_name='T002' and column_name='OBJECT_ID';

NUM_DISTINCT  NUM_NULLS    DENSITY NUM_BUCKETS
------------ ---------- ---------- -----------
          39          0 .025641026           1

SQL> select num_rows from user_tables where table_name='T002';

  NUM_ROWS
----------
     50328

SQL> select 1/39 from dual;

      1/39
----------
.025641026

SQL> select 50328*1/39 from dual;

50328*1/39
----------
1290.46154

这里我们通过统计信息发现计算而来的1290跟执行计划的rows 1290完全一致

列没有直方图,而且num_nulls为0时:
Selectivity_without_null=(1/num_distinct),也就是列的统计信息中num_nulls为0时,列的选择率是1/num_distinct,此时density也是等于1/num_distinct

列没有直方图,但是num_nulls又不为0时:
selectivity_with_null=(1/num_distinct)*(num_rows-num_nulls)/(num_rows),而density还是等于1/num_distinct

对于第一点num_nulls为0,列没有直方图,selectivity选择率和density上面已经进行了验证,下面稍微扩展点,来验证下num_nulls不为0,没有直方图时,可选择率selectivity、rows和density关系

SQL> update t002 set object_id=null where rownum SQL> commit;
SQL> execute dbms_stats.gather_table_stats(ownname=>'XIAOYU',tabname=>'T002',method_opt=>'for all columns size 1');

SQL> select NUM_ROWS, --表中的记录数
  2  BLOCKS, --表中数据所占的数据块数
  3  EMPTY_BLOCKS, --表中的空块数
  4  AVG_SPACE, --数据块中平均的使用空间
  5  CHAIN_CNT, --表中行连接和行迁移的数量
  6  AVG_ROW_LEN --每条记录的平均长度
  7  from dba_tables
  8  where owner=&owner and table_name=&tabname;
Enter value for owner: 'XIAOYU'
Enter value for tabname: 'T002'
old   8: where owner=&owner and table_name=&tabname
new   8: where owner='XIAOYU' and table_name='T002'

  NUM_ROWS     BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN
---------- ---------- ------------ ---------- ---------- -----------
     50328        712            0          0          0          91

SQL> SELECT column_name,
  2         num_distinct,
  3         num_nulls,
  4         density,
  5         num_buckets,
  6         low_value,
  7         high_value
  8    FROM dba_tab_col_statistics
  9   WHERE     owner = &owner
 10         AND table_name = &tabname
 11         AND column_name IN (&col1);
Enter value for owner: 'XIAOYU'
old   9:  WHERE     owner = &owner
new   9:  WHERE     owner = 'XIAOYU'
Enter value for tabname: 'T002'
old  10:        AND table_name = &tabname
new  10:        AND table_name = 'T002'
Enter value for col1: 'OBJECT_ID'
old  11:        AND column_name IN (&col1)
new  11:        AND column_name IN ('OBJECT_ID')

COLUMN_NAME              NUM_DISTINCT  NUM_NULLS    DENSITY    NUM_BUCKETS LOW_VALUE                      HIGH_VALUE
------------------------------ ------------ ---------- ---------- ----------- --
---------------------------- ------------------------------
OBJECT_ID                         44           943            .022727273         1 C2
02                           C3064A3F

SQL> select count(*) from t002 where object_Id=100;

  COUNT(*)
----------
     49000

SQL> select * from table(dbms_xplan.display_cursor(null,null));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  3yaw02xfsf7c8, child number 0
-------------------------------------
select count(*) from t002 where object_Id=100

Plan hash value: 3014849763

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   158 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |     3 |            |          |
|*  2 |   TABLE ACCESS FULL| T002 |  1122 |  3366 |   158   (1)| 00:00:02 |
---------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter("OBJECT_ID"=100)


19 rows selected.

来算算选择率selectivity_with_null=(1/num_distinct)*(num_rows-num_nulls)/(num_rows)
 
SQL> select (50328-943)/50328*1/44 from dual;

(50328-943)/50328*1/44
----------------------
             .02230143

算算density=1/num_distinct也跟dba_tab_columns中值一样

SQL> select 1/44 from dual;

      1/44
----------
.022727273

根据选择率selectivity_with_null跟执行计划的预估的rows也是相符的,这个地方要注意rows是严格根据num_rows*selectivity的,而不是num_rows*density,因为在没直方图时density计算方式始终是1/num_distinct

SQL> select 0.02230143* 50328 from dual;

0.02230143*50328
----------------
      1122.38637

细心点我们发觉上面计算selectivity的方式可以直接简化为:
(1/num_distinct)*(num_rows-num_nulls)/num_rows,如果num_null为0, 此时(1/num_distinct)*(num_rows-num_nulls)/num_rows就直接等于1/num_distinct

3)关闭绑定变量窥视,也不收集直方图:
SQL> create table t003 as select * from dba_objects;

Table created.

SQL> alter system set "_optim_peek_user_binds"=false;

System altered.

SQL> update t003 set object_id=10000 where object_id
48524 rows updated.

SQL> commit;

Commit complete.

SQL> execute dbms_stats.gather_table_stats(ownname=>'SYS',tabname=>'T003',method
_opt=>'for all columns size 1');

PL/SQL procedure successfully completed.

SQL> select num_rows from user_tables where table_name='T003';

  NUM_ROWS
----------
     50325

SQL> select num_distinct,density,num_nulls from user_tab_columns where table_nam
e='T003' and column_name='OBJECT_ID';

NUM_DISTINCT    DENSITY  NUM_NULLS
------------ ---------- ----------
         184 .005434783          0

SQL> variable a number;
SQL> exec : a:=10000;

PL/SQL procedure successfully completed.

SQL> select count(object_name) from t003 where object_id=:a;

COUNT(OBJECT_NAME)
------------------
             48524

SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  dq92pjhyfrg1n, child number 0
-------------------------------------
select count(object_name) from t003 where object_id=:a

Plan hash value: 3872854764

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   154 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |    29 |            |          |
|*  2 |   TABLE ACCESS FULL| T003 |   274 |  7946 |   154   (1)| 00:00:02 |
---------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T003@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------
   2 - filter("OBJECT_ID"=:A)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT("OBJECT_NAME")[22]
   2 - "OBJECT_NAME"[VARCHAR2,128]

31 rows selected.

SQL> exec : a:=10;

PL/SQL procedure successfully completed.

SQL> select count(object_name) from t003 where object_id=:a;

COUNT(OBJECT_NAME)
------------------
                 0

SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  dq92pjhyfrg1n, child number 0
-------------------------------------
select count(object_name) from t003 where object_id=:a

Plan hash value: 3872854764

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   154 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |    29 |            |          |
|*  2 |   TABLE ACCESS FULL| T003 |   274 |  7946 |   154   (1)| 00:00:02 |
---------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T003@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------
   2 - filter("OBJECT_ID"=:A)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT("OBJECT_NAME")[22]
   2 - "OBJECT_NAME"[VARCHAR2,128]

31 rows selected.

关闭绑定变量,没有直方图时:
可选择率selectivity=1/num_distinct*(num_rows-num_nulls)/num_rows

SQL> select 50325*1/184 from dual;

50325*1/184
-----------
 273.505435

SQL> select 50325*0.005434783 from dual;

50325*0.005434783
-----------------
       273.505454

特别注意点:
而且我们查看v$sql时发现,关闭绑定变量窥视并不是不共享sql,而是说sql第一次执行时不带入具体值,这个如果大家没有测试过可能会想当然的以为是关闭绑定变量窥视是不共享绑定的sql语句,其实绑定变量窥视真正含义是sql第一次执行时带入绑定具体值,而如果关闭了绑定变量窥视,则不会带入具体值,那么由于不带入具体值,直方图也不会影响selectivity计算
 
SQL> select child_number,sql_id,sql_text from v$sql where sql_text like 'select
count(object_name) from t003 where object_id=:a%';

CHILD_NUMBER SQL_ID
------------ -------------
SQL_TEXT
--------------------------------------------------------------------------------
------------------------------------------------------------
           0 dq92pjhyfrg1n
select count(object_name) from t003 where object_id=:a

4)关闭绑定变量窥视,收集直方图:
SQL> alter system set "_optim_peek_user_binds"=false;

System altered.

SQL> execute dbms_stats.gather_table_stats(ownname=>'SYS',tabname=>'T003',method
_opt=>'for all columns size 254');

PL/SQL procedure successfully completed.

SQL> select num_rows from user_tables where table_name='T003';

  NUM_ROWS
----------
     50325

SQL> select num_distinct,density,num_nulls from user_tab_columns where table_nam
e='T003' and column_name='OBJECT_ID';

NUM_DISTINCT    DENSITY  NUM_NULLS
------------ ---------- ----------
         197 .000010034          0

SQL> variable b number;
SQL> exec : b:=10000;

PL/SQL procedure successfully completed.

SQL> select count(object_name) from t003 where object_id=:b;

COUNT(OBJECT_NAME)
------------------
             48524

SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  9qunh3ms4kjzw, child number 0
-------------------------------------
select count(object_name) from t003 where object_id=:b

Plan hash value: 3872854764

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   154 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |    29 |            |          |
|*  2 |   TABLE ACCESS FULL| T003 |   255 |  7395 |   154   (1)| 00:00:02 |
---------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T003@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------
   2 - filter("OBJECT_ID"=:B)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT("OBJECT_NAME")[22]
   2 - "OBJECT_NAME"[VARCHAR2,128]

31 rows selected.

SQL> exec : b:=10;

PL/SQL procedure successfully completed.

SQL> select count(object_name) from t003 where object_id=:b;

COUNT(OBJECT_NAME)
------------------
                 0

SQL> select * from table(dbms_xplan.display_cursor(null,null,'all'));

PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
------------------------------------------------------------
SQL_ID  9qunh3ms4kjzw, child number 0
-------------------------------------
select count(object_name) from t003 where object_id=:b

Plan hash value: 3872854764

---------------------------------------------------------------------------
| Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |
---------------------------------------------------------------------------
|   0 | SELECT STATEMENT   |      |       |       |   154 (100)|          |
|   1 |  SORT AGGREGATE    |      |     1 |    29 |            |          |
|*  2 |   TABLE ACCESS FULL| T003 |   255 |  7395 |   154   (1)| 00:00:02 |
---------------------------------------------------------------------------

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

   1 - SEL$1
   2 - SEL$1 / T003@SEL$1

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter("OBJECT_ID"=:B)

Column Projection Information (identified by operation id):
-----------------------------------------------------------

   1 - (#keys=0) COUNT("OBJECT_NAME")[22]
   2 - "OBJECT_NAME"[VARCHAR2,128]

31 rows selected.

如果有直方图,但是关闭绑定变量窥视,由于无法把绑定变量的值带入sql语句中,此时selectivity计算方式还是1/num_distinct*(num_rows-num_nulls)/num_rows
SQL> select 50325*1/197 from dual;

50325*1/197
-----------
 255.456853

在关闭绑定变量窥视后,sql语句还是会软解析,只是绑定变量的sql语句第一次执行时无法带入到sql语句中,selectivity计算无法应用到直方图信息,所以此时有无直方图对于这类绑定变量的sql语句没有影响。

关于有直方图时,字段的可选择、density等如何计算,小鱼后续会整理文档来分享。

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
MySQL에서 뷰를 사용하는 한계는 무엇입니까?MySQL에서 뷰를 사용하는 한계는 무엇입니까?May 14, 2025 am 12:10 AM

mysqlviewshavelimitations : 1) 그들은 upportallsqloperations, datamanipulation throughviewswithjoinsorbqueries를 제한하지 않습니다

MySQL 데이터베이스 확보 : 사용자 추가 및 권한 부여MySQL 데이터베이스 확보 : 사용자 추가 및 권한 부여May 14, 2025 am 12:09 AM

적절한 usermanagementInmysqliscrucialforenhancingsecurityandensuringfefficientDatabaseOperation.1) USECREATEUSERTOWDDUSERS,@'localHost'or@'%'.

MySQL에서 사용할 수있는 트리거 수에 영향을 미치는 요인은 무엇입니까?MySQL에서 사용할 수있는 트리거 수에 영향을 미치는 요인은 무엇입니까?May 14, 2025 am 12:08 AM

mysqldoes notimposeahardlimitontriggers, butpracticalfactorsdeteirefectiveuse : 1) ServerConfigurationimpactStriggerManagement; 2) 복잡한 트리거 스케일 스케일 사이드로드; 3) argertableSlowtriggerTriggerPerformance; 4) High ConconcercencyCancaUspriggerContention; 5) m

MySQL : Blob을 저장하는 것이 안전합니까?MySQL : Blob을 저장하는 것이 안전합니까?May 14, 2025 am 12:07 AM

예, It 'safetostoreBlobdatainmysql, butconsidertheStefactors : 1) StoragesPace : BlobScanconSumeSignificantspace, 잠재적으로 증가하는 CostsandSlownperformance

MySQL : PHP 웹 인터페이스를 통해 사용자 추가MySQL : PHP 웹 인터페이스를 통해 사용자 추가May 14, 2025 am 12:04 AM

PHP 웹 인터페이스를 통해 MySQL 사용자를 추가하면 MySQLI 확장 기능을 사용할 수 있습니다. 단계는 다음과 같습니다. 1. MySQL 데이터베이스에 연결하고 MySQLI 확장자를 사용하십시오. 2. 사용자를 생성하고 CreateUser 문을 사용하고 Password () 함수를 사용하여 암호를 암호화하십시오. 3. SQL 주입 방지 및 MySQLI_REAL_ESCAPE_STRING () 함수를 사용하여 사용자 입력을 처리하십시오. 4. 새 사용자에게 권한을 할당하고 보조금 명세서를 사용하십시오.

MySQL : Blob 및 기타없는 SQL 스토리지, 차이점은 무엇입니까?MySQL : Blob 및 기타없는 SQL 스토리지, 차이점은 무엇입니까?May 13, 2025 am 12:14 AM

mysql'sblobissuilableforstoringbinarydatawithinareldatabase, whilenosqloptionslikemongodb, redis, and cassandraofferflexible, scalablesolutionsforunstuctureddata.blobissimplerbutcanslowwownperformance를 사용하는 것들보업 betterscal randaysand

MySQL 추가 사용자 : 구문, 옵션 및 보안 모범 사례MySQL 추가 사용자 : 구문, 옵션 및 보안 모범 사례May 13, 2025 am 12:12 AM

TOADDAUSERINMYSQL, 사용 : CreateUser'UserName '@'host'IdentifiedBy'Password '; 여기서'showTodoitseciRely : 1) ChoosetheHostCareLyTocon trolaccess.2) setResourcelimitswithOptionslikemax_queries_per_hour.3) Usestrong, iriquepasswords.4) enforcessl/tlsconnectionswith

MySQL : 문자열 데이터 유형을 피하는 방법 일반적인 실수?MySQL : 문자열 데이터 유형을 피하는 방법 일반적인 실수?May 13, 2025 am 12:09 AM

toavoidcommonmistakeswithstringdatatypesinmysql, stroundStringTypenuances, chooseTherightType, andManageEncodingAndCollationSettingSefectively.1) usecharforfixed-lengthstrings, varcharvariable-length, andtext/blobforlargerdata.2) setcarcatter

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

SublimeText3 영어 버전

SublimeText3 영어 버전

권장 사항: Win 버전, 코드 프롬프트 지원!

PhpStorm 맥 버전

PhpStorm 맥 버전

최신(2018.2.1) 전문 PHP 통합 개발 도구

Eclipse용 SAP NetWeaver 서버 어댑터

Eclipse용 SAP NetWeaver 서버 어댑터

Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

안전한 시험 브라우저

안전한 시험 브라우저

안전한 시험 브라우저는 온라인 시험을 안전하게 치르기 위한 보안 브라우저 환경입니다. 이 소프트웨어는 모든 컴퓨터를 안전한 워크스테이션으로 바꿔줍니다. 이는 모든 유틸리티에 대한 액세스를 제어하고 학생들이 승인되지 않은 리소스를 사용하는 것을 방지합니다.

WebStorm Mac 버전

WebStorm Mac 버전

유용한 JavaScript 개발 도구