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. selenium.common.exceptions.WebDriverException: Message: unknown Error: cannot find Chrome binary

    使用Chrome浏览器时,经常会遇到以下报错:浏览器没有调用起来 selenium.common.exceptions.WebDriverException: Message: unknown Err ...

  2. git----------如何创建develop分支和工作流,以及如何将develop上的代码合并到master分支上

    1.点击sourceTree 右上角的git工作流,或弹出一个弹出框,无需修改任何东西直接点击确认就可以创建develop. . 2.这里有两个分支了,当前高亮的就是你当前处在的分支.此时develo ...

  3. JAVA多线程之CountDownLatch与join的区别

    首先,我们来看一个应用场景1: 假设一条流水线上有三个工作者:worker0,worker1,worker2.有一个任务的完成需要他们三者协作完成,worker2可以开始这个任务的前提是worker0 ...

  4. cxf配置

    先记录一下,后期补充配置原因 原先的spring3.X(struts2)的时候配置cxf2.x没问题,基本就是在context.xml中加入 <import resource="cla ...

  5. vue.js中的computed和watch的区别

    1.computed在调用时不需要加(),watch是不需要调用的2.computed如果属性没有发生改变时会从缓存中读取值,watch当属性发生改变时会接收到2个值:一个为新值,一个为旧值3.com ...

  6. php 使用str_replace替换关键词(兼容字符串,一维数组,多维数组)

    通过递归的方式来实现替换字符串. /* * * 使用str_replace替换关键词(兼容字符串,一维数组,多维数组) * $search 需要查找的内容 * $replace 需要替换的内容 * $ ...

  7. Python引用拷贝赋值

    先安利一个网站,对学习编程很有帮助:http://www.pythontutor.com/ 可以逐行可视化执行代码,具体自行体验啦 这个网站也是我在看别人的博文时候找到的,也先贴上别人的理解吧,我觉得 ...

  8. GDB in Action

    GDB in Action 入门 编译 gcc -g -O0 -o word2vec.c word2vec -g 选项:要求 gcc 编译器保留调试符号信息. -O0 选项表示不优化,从 O1 ~ O ...

  9. eclipse中如何打开工作空间里面已经有的项目

    File->Import->打开大类General->找到小类Existing Projects info Workspace->选择Select root dirctory, ...

  10. Spring 学习——Spring注解——Autowiring(自动装配)

    装配方式 方式一:默认 方式二:byName:根据属性名称自动装配.会查找Bean容器内部所有初始化的与属性名成相同的Bean,自动装配.(需要通过set方法注入,注入Bean的id名称需要和实体类的 ...