跟小D每日学口语
摘要: String是一个类,string是一种数据类型. string是c#中的类,String是.net Framework的类(在c# IDE中不会显示蓝色)c# string映射为.net Framework的String如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作如果使用c#,建议使用string,比较符合规范 string始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、 阅读全文
posted @ 2011-05-24 09:22 Danny Chen 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 百万数据查询优化技巧三十则1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null值,然后这样查询: select id from t where num=03.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。4.应尽量避免在 where 子句中使用 阅读全文
posted @ 2011-05-24 09:21 Danny Chen 阅读(232) 评论(0) 推荐(0) 编辑