search
HomeDatabaseMysql Tutorial对于自适应游标共享的一点补充

关于自适应游标共享请参加:http://blog.csdn.net/yidian815/article/details/17959907 对自适应游标共享的理解,本人认为难点在于对BIND_SENSITIVE 和BIND_AWARE的认识。再来复习一下: bind_sensitive:oracle认为该语句可能会因为绑定变量的不同而需要采取

关于自适应游标共享请参加:http://blog.csdn.net/yidian815/article/details/17959907

对自适应游标共享的理解,本人认为难点在于对BIND_SENSITIVE 和BIND_AWARE的认识。再来复习一下:

bind_sensitive:oracle认为该语句可能会因为绑定变量的不同而需要采取不同的执行计划,因此需要监控该语句的执行并依据执行结果做出判断。

bind_aware:oracle通过监视已经认定该语句需要针对不同的绑定变量取值采取不同的执行计划。

现在就好出现如下的问题:

oracle认定什么样式的sql语句是bind_sensitve?

对于bind_aware的语句,oracle是如何根据不同的变量取值来选择执行计划的?

在回答这些问题之前,先来看一下测试环境

SQL> desc t2;
 名称						       是否为空? 类型
 ----------------------------------------------------- -------- ------------------------------------
 ID								NUMBER
 RTYPE								VARCHAR2(20)
 SEL								NUMBER

SQL> select column_name,histogram from dba_tab_cols where table_name='T2' AND OWNER='EASY1';

COLUMN_NAME		       HISTOGRAM
------------------------------ ---------------
ID			       NONE
RTYPE			       FREQUENCY
SEL			       NONE


SQL> select rtype,count(1),min(sel),max(sel) from t2 group by rtype order by 3;

RTYPE		       COUNT(1)   MIN(SEL)   MAX(SEL)
-------------------- ---------- ---------- ----------
1			      1 7.6295E-06 7.6295E-06
2			      2 .000015259 .000015259
3			      4 .000030518 .000030518
4			      8 .000061036 .000061036
5			     16 .000122072 .000122072
6			     32 .000244144 .000244144
7			     64 .000488289 .000488289
8			    128 .000976577 .000976577
9			    256 .001953155 .001953155
10			    512  .00390631  .00390631
11			   1024 .007812619 .007812619

RTYPE		       COUNT(1)   MIN(SEL)   MAX(SEL)
-------------------- ---------- ---------- ----------
12			   2048 .015625238 .015625238
13			   4096 .031250477 .031250477
14			   8192 .062500954 .062500954
15			  16384 .125001907 .125001907
16			  32768 .250003815 .250003815
17			  65536  .50000763  .50000763
sel代表rype在整张表中的选择性。

首先我们猜测第一个问题的答案。

因为bind_sensitive是针对绑定变量的不同取值而论的,因此我们认为只有具有绑定变量的语句才可能是bind_sensitive的。

SQL> select sum(id) from t2 where rtype=16;

   SUM(ID)
----------
1610596352

SQL> select sum(id) from t2 where rtype=1;

   SUM(ID)
----------
	 1
SQL> l
  1* select sql_text,is_bind_sensitive,is_bind_aware from v$sql where sql_text like 'select sum(id) from t2%'
SQL> /

SQL_TEXT						     I I
------------------------------------------------------------ - -
select sum(id) from t2 where rtype=1			     N N
select sum(id) from t2 where rtype=16			     N N
是不是具有绑定变量就一定会是bind_sensitive?
SQL> var v varchar2(100)
SQL> select sum(id) from t2 where rtype=:v;

   SUM(ID)
----------

SQL> select sum(id) from t2 where id=:v;

   SUM(ID)
----------
SQL> l
  1* select sql_text,is_bind_sensitive,is_bind_aware from v$sql where sql_text like 'select sum(id) from t2%'
SQL> /

SQL_TEXT						     I I
------------------------------------------------------------ - -
select sum(id) from t2 where rtype=1			     N N
select sum(id) from t2 where id=:v			     N N
select sum(id) from t2 where rtype=:v			     Y N
select sum(id) from t2 where rtype=16			     N N
看来不光需要具有绑定变量,还需要在绑定变量所在列上具有直方图统计信息才可以。当然这是在等值操作的情况下,在其他情况下那?在这里我们不做分析,至少在目前的情况下,oracle对bind_sensitive具有如下限制(官方文档):

The optimizer has peeked at the bind values to generate selectivity estimates.

A histogram exists on the column containing the bind value.

  • 下面一段文字来自网络,尽快参考

     Q: What triggers a cursor to be marked "bind sensitive"?

    A: Our goal is to consider many types of predicates where the selectivity can change when the bind value changes. In this first version of the feature, we only handle equality predicates where a histogram exists on the column and range predicates (with or without histogram). We do not currently consider LIKE predicates, but it is on the top of our list for future work.

    下面我们来看看bind_aware的语句是如何工作的,为了简化操作,我们直接使用BIND_AWARE hint。关于该hint的使用,有如下解释:

    From 11.1.0.7 onward it is possible to skip the monitoring that is required to detect bind-sensitive queries by using the BIND_AWARE hint. In the following example, the presence of the hint tells the optimizer that we believe the query is bind-sensitive, so it should use bind-aware cursor sharing from the first execution.

    SELECT /*+ BIND_AWARE */ MAX(id) FROM acs_test_tab WHERE record_type = :l_record_type;

    The hint will only work if the query uses bind variables in WHERE clause predicates referencing columns with histograms.

    There is also a NO_BIND_AWARE hint that tells the optimizer to ignore bind-sensitive queries, effectively hiding the query from the adaptive cursor sharing functionality.

    Bind-aware cursor sharing has a small overhead associated with it, which is why Oracle use the "adaptive" approach to identifying queries that would benefit from bind-aware cursor sharing. Adding the hint to queries that will not benefit from it is a waste.

    在进一步实验之前,创建表t1

    SQL> create table t1 as select * from t2 where 1 =2;
    
    表已创建。
    
    SQL> alter table t1 modify rtype number;
    
    表已更改。
    
    SQL> insert into t1 select * from t2;
    
    已创建 131071 行。
    
    SQL> commit;
    
    提交完成。
    
    SQL> create index i1 on t1(rtype);
    
    索引已创建。
    SQL> exec dbms_stats.gather_table_stats(user,'t1',cascade=>true,estimate_percent=>null,method_opt=>'for all columns size auto,for columns rtype size 40');
    
    PL/SQL 过程已成功完成。
    
    SQL> select table_name,column_name,endpoint_number,to_char(endpoint_value),endpoint_actual_value from user_histograms where table_name='T1';
    
    TABLE_NAME COLUMN_NAME		ENDPOINT_NUMBER TO_CHAR(ENDPOINT_VALUE) 		 ENDPOINT_ACTUAL_VALUE
    ---------- -------------------- --------------- ---------------------------------------- ------------------------------
    T1	   RTYPE			      1 1
    T1	   RTYPE			      3 2
    T1	   RTYPE			      7 3
    T1	   RTYPE			     15 4
    T1	   RTYPE			     31 5
    T1	   RTYPE			     63 6
    T1	   RTYPE			    127 7
    T1	   RTYPE			    255 8
    T1	   RTYPE			    511 9
    T1	   RTYPE			   1023 10
    T1	   RTYPE			   2047 11
    
    TABLE_NAME COLUMN_NAME		ENDPOINT_NUMBER TO_CHAR(ENDPOINT_VALUE) 		 ENDPOINT_ACTUAL_VALUE
    ---------- -------------------- --------------- ---------------------------------------- ------------------------------
    T1	   RTYPE			   4095 12
    T1	   RTYPE			   8191 13
    T1	   RTYPE			  16383 14
    T1	   RTYPE			 131071 17
    T1	   ID				      0 1
    T1	   SEL				      0 .00000762951094834821
    T1	   ID				      1 131071
    T1	   SEL				      1 .87501335164416
    
    已选择19行。
    SQL> select rtype,count(1),min(sel),max(sel) from t1 group by rtype order by 3;
    
         RTYPE   COUNT(1)	MIN(SEL)   MAX(SEL)
    ---------- ---------- ---------- ----------
    	 1	    1 7.6295E-06 7.6295E-06
    	 2	    2 .000015259 .000015259
    	 3	    4 .000030518 .000030518
    	 4	    8 .000061036 .000061036
    	 5	   16 .000122072 .000122072
    	 6	   32 .000244144 .000244144
    	 7	   64 .000488289 .000488289
    	 8	  128 .000976577 .000976577
    	 9	  256 .001953155 .001953155
    	10	  512  .00390631  .00390631
    	11	 1024 .007812619 .007812619
    
         RTYPE   COUNT(1)	MIN(SEL)   MAX(SEL)
    ---------- ---------- ---------- ----------
    	12	 2048 .015625238 .015625238
    	13	 4096 .031250477 .031250477
    	14	 8192 .062500954 .062500954
    	17     114688 .875013352 .875013352
    对bind_aware的实验过程如下:
    SQL> alter system flush shared_pool;
    
    系统已更改。
    
    SQL> var vr number;
    SQL> exec :vr := 1
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    	 1
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y    --由于使用了bind_aware HINT 
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008 --根据直方图计算出rtype=1的选择性
    
    SQL> exec :vr := 2
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    	 5
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N  --逐步淘汰出内存
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017    --由于rtype=2的选择性不再0.00007~0.00008之间,所以生成新的子游标,由于新游标和旧游标的执行计划相同,所以进行合并,子游标0被设置为非共享,逐步淘汰出内存
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    SQL> exec :vr := 1
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    	 1
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y Y   --使用新的子游标,不再使用0号子游标
    
    SQL> @sho_sel
    SP2-0310: 无法打开文件 "sho_sel.sql"
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    SQL> exec :vr := 3
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    	22
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     2 =VR						 0 0.000007   0.000034
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    SQL> exec :vr := 1
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    	 1
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y Y
    
    SQL> exec :vr := 8
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
         24512
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     3 =VR						 0 0.000007   0.001074
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     2 =VR						 0 0.000007   0.000034
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    SQL> exec :vr := 14
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
     100659200
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     4 =VR						 0 0.000007   0.068751
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     3 =VR						 0 0.000007   0.001074
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     2 =VR						 0 0.000007   0.000034
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    SQL> exec :vr := 15
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    
    已选择6行。
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     5 =VR						 0 0.000003   0.068751 --由于15不存在,所以选择性向下扩充
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     4 =VR						 0 0.000007   0.068751
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     3 =VR						 0 0.000007   0.001074
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     2 =VR						 0 0.000007   0.000034
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    已选择6行。
    
    SQL> exec :vr := 17
    
    PL/SQL 过程已成功完成。
    
    SQL> select /*+ bind_aware */ sum(id) from t1 where rtype = :vr;
    
       SUM(ID)
    ----------
    8455659520
    
    SQL> @show_sql
    
    SQL_TEXT						     EXECUTIONS I I I
    ------------------------------------------------------------ ---------- - - -
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      2 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y N
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    select /*+ bind_aware */ sum(id) from t1 where rtype = :vr	      1 Y Y Y
    
    已选择7行。
    
    SQL> @show_sel
    
    ADDRESS 	 HASH_VALUE SQL_ID	  CHILD_NUMBER PREDICATE				  RANGE_ID LOW	      HIGH
    ---------------- ---------- ------------- ------------ ---------------------------------------- ---------- ---------- ----------
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     6 =VR						 0 0.787503   0.962503 --新的子游标的执行计划于旧子游标不同,所以均保留
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     5 =VR						 0 0.000003   0.068751
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     4 =VR						 0 0.000007   0.068751
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     3 =VR						 0 0.000007   0.001074
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     2 =VR						 0 0.000007   0.000034
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     1 =VR						 0 0.000007   0.000017
    00000000DD40C0E0 2679189014 082txyqgv2bhq	     0 =VR						 0 0.000007   0.000008
    
    已选择7行。
    
    由此可见,计算绑定变量的谓词选择性在bind_aware中扮演者重要角色
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use