Show MySQL processlist SHOW FULL PROCESSLIST Check Binlog show variables like 'log_bin' show tables SHOW TABLES command provides you with an option that allows you to filter the returned tables using the LIKE operator or an expression in the WHERE clause as follows: SHOW TABLES LIKE pattern; SHOW TABLES WHERE expression; > SHOW TABLES LIKE 'p%'; +------------------------------+ | Tables_in_testdb (p%) | +------------------------------+ | productlines | | products | +------------------------------+ 2
数据库长连接 长连接是指程序之间的连接在建立之后,就一直打开,被后续程序重用。使用长连接的初衷是减少连接的开销。 先看看官方文档是怎么讲Djan
为了解决单个数据库的性能问题,除了使用性能更好的硬件之外, 另外一个思路就是将一个数据库切分成多个部分放到不同的数据库上,从而缓解单一数据库的
索引失效的情况 create payment table: create table payment_tab { `id` bigint unsigned auto_increment, `payment_id` bigint unsigned not null, `user_id` bigint unsigned not null, `create_time` int unsigned not null, `update_time` int unsigned not null default 0, `amount` bigint not null default 0, `payment_status` tinyint not null default 0, `ref` varchar(64) default NULL, `payment_type` tinyint not null default 0, primary key (`id`), -- 主键 `idx_user_id` (`user_id`),