C# Stopwatch类 命名空间:System.Diagnostics; namespace System.Diagnostics { // 提供一组方法和属性,可用于准确地测量运行时间. public class Stopwatch { // 获取以每秒计时周期数表示的计时器频率.此字段为只读. public static readonly long Frequency; // 指示计时器是否基于高分辨率性能计数器.此字段为只读. public static readonly bool I
---收缩数据库日志文件 USE [master]ALTER DATABASE yourdatabasename SET RECOVERY SIMPLE WITH NO_WAITALTER DATABASE yourdatabasename SET RECOVERY SIMPLE USE yourdatabasename DBCC SHRINKFILE (N'yourdatabasename _Log' , 0,TRUNCATEONLY) --数据库日志文件名(数据库右键-属性-日志逻辑文件名)
自动更新修改时间: mysql> create table z(a int ,b timestamp on update current_timestamp); mysql> insert into z ,current_timestamp; mysql> select * from z; +------+---------------------+ | a | b | +------+---------------------+ | | -- :: | +------+--------
查看数据库表基本信息. select * from information_schema.TABLES where information_schema.TABLES.TABLE_SCHEMA = '数据库名' and information_schema.TABLES.TABLE_NAME = '表名'; 查看mysql数据库大小 SELECT sum(DATA_LENGTH)+sum(INDEX_LENGTH) FROM information_schema.TABLES where TAB