zoukankan      html  css  js  c++  java
  • (2.6)Mysql之SQL基础——存储引擎的查看与修改

    (2.6)Mysql之SQL基础——存储引擎的查看与修改

     可以使用

      show engines;

    查看数据库支持的所有的存储引擎;

    目录:

      

    1、数据库级别存储引擎

      1.1查看现在默认的存储引擎

      1.2 会话级别修改存储引擎

    2、表级存储引擎

      2.1 查看表现有的存储引擎(三种方法)

      2.2 修改表的存储引擎 

      2.3 新建表时设置存储引擎

    3、查询整个Mysql里面存储引擎为innodb/myisam的表

      【1】查看整个实例:

      【2】查看某个数据库:

    4、其他存储引擎

      4.1 archive(适用于大数据的插入与查询)

       

    1、数据库级别存储引擎

      1.1查看现在默认的存储引擎

        show variables like '%storage%' ;

        

        可以在my.cnf中设置 default-storage-engine = innodb   (设置完后,重启生效)

      1.2 会话级别修改存储引擎

        set default_storage_engine=myisam ;  #仅当前会话有效,重启会恢复原来的配置。

    2、表级存储引擎

      2.1 查看表现有的存储引擎(三种方法)

        【1】show create table test101;

        【2】show table status from test1 where name = 'test101';

        【3】select * from information_schema.tables where table_schema='test1' and table_name = 'test101';

          

      2.2 修改表的存储引擎

        alter table test101 engine myisam;

       2.3 新建表时设置存储引擎

        create table a2(id int,name varchar(20)) engine=archive;

    3、查询整个Mysql里面存储引擎为innodb/myisam的表

      【1】查看整个实例:

        select * from information_schema.tables where engine='innodb';

      【2】查看某个数据库:

        select * from information_schema.tables where table_schema='test1' and engine='innodb';

    4、其他存储引擎

      4.1 archive(适用于大数据的插入与查询)

        create table a2(id int,name varchar(20)) engine=archive;

  • 相关阅读:
    C#中Post和Get提交
    C#实现动态页面静态化
    瀑布流的实现
    jQuery常用方法验证
    eclipse配置PHP开发环境
    数据结构学习
    机器学习实战
    Leetcode_StringToInteger
    网络学习
    leetcode_前期心得
  • 原文地址:https://www.cnblogs.com/gered/p/10363252.html
Copyright © 2011-2022 走看看