随笔分类 -  mysql

摘要:Error Code: 1418This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want ... 阅读全文
posted @ 2015-12-09 15:59 webzhang 阅读(292) 评论(0) 推荐(0)
摘要:在建mysql 外键时候注意:1、外键字段类型要一样2、外键字段要有索引3、有数据时候最好SET FOREIGN_KEY_CHECKS = 0例子:SET FOREIGN_KEY_CHECKS = 0 ALTER TABLE sys_street ADD CONSTRAINT sy... 阅读全文
posted @ 2015-12-08 15:08 webzhang 阅读(142) 评论(0) 推荐(0)
摘要:在mysql优化时候 怎么看索引有没有走到SELECT object_type,object_schema,object_name,index_name,count_star,count_read,COUNT_FETCH FROM performance_schema.table_io_waits_... 阅读全文
posted @ 2015-11-16 18:26 webzhang 阅读(681) 评论(0) 推荐(0)
摘要:创建索引可以很明显加快查询速度。创建普通索引ALTER TABLE 表明 ADD INDEX 索引名字(表列名字)例子:ALTER TABLE opm_peccancyfine ADD INDEX opm_peccancyfine_parkuserid_index (ParkUserId) 阅读全文
posted @ 2015-11-16 10:28 webzhang 阅读(150) 评论(0) 推荐(0)
摘要:mysqlgroup_concat函数默认长度不够时候数据库执行 SET GLOBAL group_concat_max_len=102400; SET SESSION group_concat_max_len=102400;就可以加大函数返回长度。有时需要重启IIS才能接口才能挣钱返回数组(不知... 阅读全文
posted @ 2015-11-12 15:04 webzhang 阅读(151) 评论(0) 推荐(0)