小编Eng*_*der的帖子

在MySQL服务启动时运行SQL查询

我在mysql上创建了HEAP(ram)表,以便更快地查询.但是在mysql服务器重启之后,我的Heap表中的数据没有被加载.

我的正常的表名:产品与ID,PRODUCT_NAME,地位的MyISAM

id => integer和auto_increment,主键

product_name => var_char和key(索引)

status =>布尔值

实际查询:

`Select id from products where product_name like "product_name"`
Run Code Online (Sandbox Code Playgroud)

我想提高速度,所以我创建了具有相同结构的表,并将命名的products_ram创建为mysql HEAP表.我正在使用此代码填充:

insert p_shop.products_ram select * from p_shop.products;
Run Code Online (Sandbox Code Playgroud)

但是当重启mysql实例时,HEAP(ram)表数据已经消失了.

我找到了一个关于mysql内存存储的文档:http: //dev.mysql.com/doc/refman/5.0/en/memory-storage-engine.html

但我找不到我想要的东西.

我想在mysql服务器初始化时自动将我的数据从products表插入/复制到products_ram表.

任何帮助将不胜感激.

编辑:我的操作系统:Windows Server 2008 R2和Mysql:MySQL 5.5

mysql sql heap insert

12
推荐指数
1
解决办法
4307
查看次数

PHP停止构造函数的最佳方法

我正在处理停止构造函数.

public function __construct()
{
   $q = explode("?",$_SERVER['REQUEST_URI']);
   $this->page = $q[0];

   if (isset($q[1]))
      $this->querystring = '?'.$q[1];

   if ($this->page=='/login') {include_once($_SERVER['DOCUMENT_ROOT'].'/pages/login.php');
      // I WANT TO EXIT CONSTRUCTOR HERE
}
Run Code Online (Sandbox Code Playgroud)

有停止/退出构造函数的函数:

die(),exit(),break()返回false

我使用return false但我对安全性感到困惑.退出构造函数的最佳方法是什么?

感谢您的时间.

php security constructor exit

3
推荐指数
1
解决办法
3000
查看次数

通过Internet连接没有TCP/IP

今天我在考虑连接两台没有tcp/ip的电脑.其实我在搜索:没有ip的连接; 如果我设法连接没有IP,这些网络是无法追踪的.

我的完整问题是:

可以通过互联网连接两台没有tcp/ip的计算机.

可能这些情况对ISP来说是不可能的.我不知道.

如果可能的话,它可以成为互联网的竞争对手.

ip networking web-services tcp-ip

-2
推荐指数
1
解决办法
887
查看次数

标签 统计

constructor ×1

exit ×1

heap ×1

insert ×1

ip ×1

mysql ×1

networking ×1

php ×1

security ×1

sql ×1

tcp-ip ×1

web-services ×1