`
openxtiger
  • 浏览: 147714 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论
文章列表
由于客户数据量越来越大,在实践中让我发现mysql的exists与inner join 和 not exists与 left join 性能差别惊人。 我们一般在做数据插入时,想插入不重复的数据,或者盘点数据在一个表,另一个表否有存在相同的数据会用not exists和exists,例如: insert into t1(a1) select b1 from t2 where not exists(select 1 from t1 where t1.id = t2.r_id);   如果t1的数据量很大时,性能会非常慢。经过实践,用以下方法能提高很多。 insert into t1( ...
$.initLineNumbers = function () { var hash = window.location.hash.substring(1), container = $.get('container'), hasLines, node; // Add ids for each line number in the file source view. $('.linenums>li').each(function () { $(this).set('id', 'l' + (i ...
用过Jquery的朋友都知道,Jquery是通过Object.prototype.toString.call还判断对象的类型的,那究竟如何做呢?   来到http://www.ecma-international.org/ecma-262/5.1/#sec-15.2.4.2的一段话:   Object.prototype.toString ( )   When the toString method is called, the following steps are taken:   1.If the this value is undefined, return &quo ...
随着Jquery对dom的编程的便利,HTML5也慢慢融入了对dom的编程的扩展。querySelectorAll就是一个很好的例子.   Document.querySelectorAll 返回当前文档中匹配一个特定选择器的所有的元素(使用depth-first pre-order这样的规则遍历所有文档节点) .返回的对象类型是 NodeList. 语法: elementList = baseElement.querySelectorAll(selectors);  其中 elementList会是一个non-live的NodeList对象. baseElement是一个元 ...
J框架发布了,模拟了Java的语法,让Javascript面向对象编程。 Jclass 对DOM封装,类似Jquery,但比Jquery轻便。 oop 实现了对Java的语法模拟。   详情请查看: http://openxtiger.github.io/j/
/** * package junit */ 'package junit'.j(function () { /** * @class junit.Observable */ 'class Observable'.j({ /** * @constructor * @param config */ hidden:true, constructor: function (config) { var jt ...
1. 从http://nginx.org/下载nginx 2. tar zxvf nginx-*.tar.gz 3. ./configure --prefix=/usr/local/nginx --with-openssl=/usr/include --with-pcre=/usr/local/pcre-8.33 其中:--with-pcre=/usr/local/pcre-8.33为pcre的源码目录,不是安装目录,pcre可以从http://www.pcre.org/下载 ./configure --prefix=/usr/local/pcre-7.8 --libdir=/usr ...
1. SHOW VARIABLES 2. SHOW COLLATION 3.SHOW DATABASES 4.SHOW FULL TABLES FROM 5.SHOW KEYS FROM  6.SHOW FULL COLUMNS FROM    
--print-defaults        Print the program argument list and exit. --no-defaults           Don't read default options from any option file. --defaults-file=#       Only read default options from the given file #. --defaults-extra-file=# Read this file after the global files are read.   --all     ...
修改linux引导: #sbin/grub  grub> find /grub/stage1  find /grub/stage1 (hd0,0) 如果你没找到试试 find /boot/grub/stage1 find stage1  将CentOS的grub安装到MBR grub> root (hd0,0) grub> setup (hd0) grub> reboot   修改 vi /boot/grub/menu.lst中的 (hd1,0)为(hd0,0)   yum 判断提供商: yum provides */lspci   安 ...
If you enable EPEL, you can install nagios, or bugzilla, or any other standard open source software just using yum command. The following yum command displays all the repositories available on your system. As you see below, it has three CentOS-6 repositories (base, extras and updates). This doesn’t ...
chroot /mnt/sysimage   批量文件名替换:rename 's/proc_sh_stone_/proc_sh_tool_/;'  proc_sh_stone_*  日志分析:awk -F '|' 'int($3)>500 {printf $"\n"}'  microsoul > microsoul1   网络配置: vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="static" HWADDR=& ...
大家好,为了和CTO的文章同步,现在将这里的文章搬到CTO上。
APR源码都是一些高人不断持续的开发,很多算法做得非常巧妙,现在把这些精髓慢慢记录,以便将来能用上。 1. 块内存索引    APR 内存采取的则是“规则块”分配原则。支持的分配的最小空间是 8K,如果分配的空间达不到 8K 的大小,则按照 8K 去分配;如果需要的空间超过 8K,则将分配的空间往上调整为 4K 的倍数。这样内存就可以用索引来决定内存块的大小,索引和实际大小的转换关系为:index = (size >> BOUNDARY_INDEX) - 1; 2. 用二维指针记录上一个节点的next指针    APR在制作链表结构时,并不是用一个指针分别指向下一个节点和 ...
说到apr的内存池,必须知道如何构建一个环形双向链表。因为apr内存池apr_pool_t的active就是一个环形双向链表。   #define list_insert(node, point) do { \   node->ref = point->ref; \   *node->ref = node; \ node->next = point; \ point-& ...
Global site tag (gtag.js) - Google Analytics