数据库链接:

mysql -uroot -p <!--数据库连接-->
mysql -h10.0.0.100 -uuser -password
show databases <!--查看所有db-->
INSERT into `user` ( 
select id+3333504 ,`user_name` , `password` , 
`birthday` , `mobile` , `email` , `province` , `city` , `region` , `create_at` , `update_at` ,
`login_at` , `last_login_at` , `account_status` , `account_open_at`, `risk_at` , `risk_end` , `risk` ,
`nick` , `sms_status`, `source` , `fund_account` , `branch_no` , `id_no` , `client_name` , 
`friend_id` , `client_id` , `user_type` , `sale_licence` , `operate_code` , `user_status` , `user_trace`, `remote_addr` , `channel` 
from `user` ) <!----插入测试数据-->

计划任务:

mysql> show variables like "%pro%";<!---查一下profile是不是打开(未打开)-->
mysql> set profiling=1; <!--设置profile打开-->
mysql> use test --切换使用db
select id_no,user_name,mobile from `user` where SUBSTR(id_no,11,4)='0512' ; --执行sql
mysql> show profiles; --查看sql记录
mysql> show profile for query 2; ---查看详情计划任务
mysql> show profile block io,cpu for query 3; ---CPU、IO使用情况
mysql> show profile memory for query 3; --内存使用

{
"Status": "query end", 状态
"Duration": "1.751142", 持续时间
"CPU_user": "0.008999", cpu用户
"CPU_system": "0.003999", cpu系统
"Context_voluntary": "98", 上下文主动切换
"Context_involuntary": "0", 上下文被动切换
"Block_ops_in": "8", 阻塞的输入操作
"Block_ops_out": "32", 阻塞的输出操作
"Messages_sent": "0", 消息发出
"Messages_received": "0", 消息接受
"Page_faults_major": "0", 主分页错误
"Page_faults_minor": "0", 次分页错误
"Swaps": "0", 交换次数
"Source_function": "mysql_execute_command", 源功能
"Source_file": "sql_parse.cc", 源文件
"Source_line": "4465" 源代码行
},

简单一点:

explain select * from tab_no_index ;

时间戳:

mysql>SELECT FROM_UNIXTIME( 1249488000, '%Y%m%d' ) 
mysql> SELECT UNIX_TIMESTAMP('2009-08-06') ; 
SELECT DATE_FORMAT(date_id,'%Y-%m-%d') from batch_select_check_point a where date_id< STR_TO_DATE('2016-08-10','%Y-%m-%d')

最新文章

  1. GRU(Gated Recurrent Unit) 更新过程推导及简单代码实现
  2. jquery.validate.js 应用示例
  3. oepn sync
  4. saas系统架构经验总结
  5. hdu-1800
  6. js数组去重,并统计最多项算法
  7. 登录oracle时,scott is locked (帐户被锁定) 的解决方法
  8. 搭建SSH
  9. [KISSY5系列]淘宝全终端框架 KISSY 5--从零开始使用
  10. C# IE浏览器
  11. JavaWeb(一)JavaWeb应用的概念
  12. git 回滚远程服务端master的代码
  13. 22.C# 事件
  14. Windows 10 远程桌面出现身份验证错误:要求的函数不受支持(解决)
  15. Create Oracle database using dbca in silent mode
  16. AD采集问题
  17. 深度学习课程笔记(十)Q-learning (Continuous Action)
  18. TP框架(接口文档模板框架)
  19. win32获取浏览器当前Tab的URL
  20. [Java学习] java泛型通配符和类型参数的范围

热门文章

  1. 「Python」conda与pip升级所有的包
  2. 接口测试工具postman(五)批量执行测试用例
  3. bash特性-命令历史命令行编辑
  4. servlet和Jsp的复习整理
  5. docker学习2
  6. 统计学习三:1.k近邻法
  7. Kali信息收集-DNS
  8. Rightmost Digit(最后一位数字)
  9. Calculator PartⅢ
  10. 微信小程序项目笔记以及openId体验版获取问题