摘要:
<?php // ini_set('display_errors', 'on');// error_reporting(E_ALL|E_STRICT); error_reporting(0);// 错误异常类 错误接管class App{ public function __construct(){ 阅读全文
摘要:
mysql> prepare getpdo from 'select * from pdo where id=?'; ERROR 1146 (42S02): Table 'yanruicheng.pdo' doesn't exist mysql> prepare getpdo from 'selec 阅读全文
摘要:
<!DOCTYPE html><html><head> <meta charset="utf-8"/> <title>看新闻</title></head><body> <input type="button" value="看新闻"> <ul></ul></body><script type="te 阅读全文
摘要:
<!DOCTYPE html><html><head> <meta charset="utf-8"/> <title>唐诗</title></head><body> <input type="button" value = "换一首"> <h1>名称</h1> <h2>作者</h2> <!-- <h 阅读全文
摘要:
查看索引的使用情况 Show status like’handler_read%’; mysql> show status like'handler_read%'; + + + | Variable_name | Value | + + + | Handler_read_first | 0 | | 阅读全文
摘要:
索引搜索变快,但是增删改会变慢 索引本身也要占空间 存在*.myini中的 介绍一款工具 Explain 这是一款分析工具,可以对一个sql语句进行分析,可以预测sql语句执行效率。 mysql> explain select * from emp where empno= 998776\G; ** 阅读全文
摘要:
阅读全文
摘要:
数据库的优化主要从4个方面来考量: 1,数据库设计 2,sql语句优化 3,数据库参数配置 4,恰当的硬件资源和操作系统 这个顺序也表现了这4个工作对性能的影响 1,数据库的概念怎么算合理呢? 答:要符合3NF 3范式(3个规范的模式,最高级别到6范式)有时,我们需要适当的逆范式。 2,sql语句的 阅读全文
摘要:
<?php ini_set("display_errors", "On");error_reporting(E_ALL | E_STRICT);//简单工厂// new mysql('localhost','root','root');// new mysql();//这个模式如果换了mysql类或 阅读全文