MySQL 5.5 Reference Manual  /  SQL Statement Syntax  /  Database Administration Statements  /  SHOW Syntax

SHOW OPEN TABLES Syntax

列出当前打开在表缓存的非临时表,from从句可用来限制不同数据库 like 限制表名 where从句可用选择行

show open tables where In_use>=1 and Name_locked=0;

In_use 表锁和锁请求的数量

SHOW BINARY LOGS Syntax

查看二进制logs的文件名字及大小

SHOW BINARY LOGS 等于 SHOW MASTER LOGS

在5.5.24之前,需要SUPER权限。5.5.25开始,具有REPLICATION_CLIENT权限也可以执行此查询。

SHOW PROFILE Syntax

查看SQL执行概要

-- https://dev.mysql.com/doc/refman/5.5/en/show-profile.html
-- Malformed statements are profiled.
select @@profiling;

select count(1) from statisticsdata.activityEvent;

show profiles;

show profile all for query 86;

select state, format(duration, 6) as duration from INFORMATION_SCHEMA.PROFILING where QUERY_ID = 86 order by SEQ;
desc information_schema.profiling;

一些show语句支持where、like 从句查询,限制结果集数量

show status where Variable_name = 'Uptime';

show status where Variable_name like '%Uptime%';

这些show语句分别是

show character set

show collation

show columns

show databases

show function status

show index

show open tables

show procedure status

show status

show table status

show tables

show triggers

show variables

SHOW Syntax的更多相关文章

  1. 如何在Open Live Writer(OLW)中使用precode代码高亮Syntax Highlighter

    早先Microsotf的Windows Live Writer(WLW)现在已经开源了,并且更名为Open Live Writer,但是现在Windows Live Writer还是可以现在,Open ...

  2. Linix登录报"/etc/profile: line 11: syntax error near unexpected token `$'{\r''"

    同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登 ...

  3. 获取文件的缩略图Thumbnail和通过 AQS - Advanced Query Syntax 搜索本地文件

    演示如何获取文件的缩略图 FileSystem/ThumbnailAccess.xaml <Page x:Class="XamlDemo.FileSystem.ThumbnailAcc ...

  4. myeclipse中导入js报如下错误Syntax error on token "Invalid Regular Expression Options", no accurate correc

    今天在使用bootstrap的时候引入的js文件出现错误Syntax error on token "Invalid Regular Expression Options", no ...

  5. Everything search syntax

    Operators: space AND | OR ! NOT < > Grouping " " Search for an exact phrase. Wildcar ...

  6. MySQL server version for the right syntax to use near 'TYPE=MyISAM'

    最近将一个版本为4.0.18-Max的MySQL数据库迁移到5.6.20-enterprise-commercial-advanced上.好吧,这是我迄今为止,见到过的最古老版本的MySQL数据库,这 ...

  7. Linux中syntax error near unexpected token 错误提示解决方法

    Linux中syntax error near unexpected token ... 错误提示有一般有两种原因: 1)window和Linux下换行符不一致导致 window下的换行和Linux下 ...

  8. linux 报错 bash ‘/bin/sh: Syntax error: “(” unexpected

    今天用make 编译 蹦到 bash ‘/bin/sh: Syntax error: “(” unexpected 和 /bin/sh: [[: not found 这种莫名奇妙的错误 原因是是lin ...

  9. [已解决] No syntax specified for the proto file : xxx.proto

    在使用protobuf生成相应类文件如java文件的时候需要指定proto的版本, 如: syntax = "proto2"; package my_package; messag ...

  10. delphi Syntax check、 build、 run、 compile的区别

    delphi Syntax check. build.  run. compile的区别 Build是从新编译所有和生成exe有关的文件,无论.pas文件是否修改过,它都会重新生成新的.dcu,并从新 ...

随机推荐

  1. mysql----------利用navicat查看两个数据库之间的差异

  2. SQL获取第一天最后一天

    DECLARE @dtdatetime SET @dt=GETDATE() DECLARE @number int --1.指定日期该年的第一天或最后一天 --A. 年的第一天 SELECTCONVE ...

  3. 记录Ok6410 sd 启动uboot

    1\参考资料https://github.com/SeanXP/ARM-Tiny6410/tree/master/no-os/sd-no-os/u-boot 2\参考资料https://blog.cs ...

  4. nginx-负载均衡相关配置 第五章

    一.负载均衡: 通过反向代理客户端的请求到一个服务器群组,通过某种算法,将客户端的请求按照自定义的有规律的一种调度调度给后端服务器. Nginx的负载均衡使用upstream定义服务器组,后面跟着组名 ...

  5. iOS UIAlertController在iPhone与iPad上的区别

    很简单的一段代码: // 首先声明一个UIAlertController对象 private var alertController: UIAlertController! // 初始化UIAlert ...

  6. Vue提供操作DOM的方法

    <div ref="wrapper"> Vue.js 提供了我们一个获取 DOM 对象的接口—— vm.$refs.在这里,我们通过了 this.$refs.wrapp ...

  7. jQuery validator plugin之概要

    jQuery validator 主页 github地址 demo学习 效果: Validate forms like you've never validated before! 自定义Valida ...

  8. 基本设置_common_setting

    comment(备注) ID(请勿修改) Param(参数) 说明与格式 积分物品ID设置 1 60000 积分属性虚拟货币,存储在Auth库account表TokenAmount字段. 这里设置积分 ...

  9. python获取当前文件路径以及父文件路径

    #当前文件的路径 pwd = os.getcwd() #当前文件的父路径 father_path=os.path.abspath(os.path.dirname(pwd)+os.path.sep+&q ...

  10. 716-River Crossing

    深奥dp,状态转来转去,反正就是能解题 #include <cstdio> #include <iostream> #include <cstring> #incl ...