`
echohfut
  • 浏览: 225049 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
一, oracle的索引陷阱一个表中有几百万条数据,对某个字段加了索引,但是查询时性能并没有什么提高,这主要可能是oracle的索引限制造成的。 oracle的索引有一些索引限制,在这些索引限制发生的情况下,即使已经加了索引,oracle还是会执行一次全表扫描,查询的性能不会比不加索引有所提高,反而可能由于数据库维护索引的系统开销造成性能更差。 下面是一些常见的索引限制问题。 1、使用不等于操作符(<>, !=)下面这种情况,即使在列dept_id有一个索引,查询语句仍然执行一次全表扫描 select * from dept where staff_num <> 1 ...
1. java.io 中用到了装饰模式和适配器模式 装饰模式, In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders a ...
1. java文件编译时可以通过指定 -source 1.4选择用JDK 1.4编译源文件。这在系统只装了JDK5或者6时比较有用。
There are clustered and nonclustered indexes. A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. A nonclustered index is a speci ...

单例类

    博客分类:
  • JDK
单例类中考虑到的有: 1. 私有的构造函数 2. static final 的instance域 3.  多线程环境下,double check考虑 4.  单例类如果实现了Serializable接口(直接或者间接),需要添加一个 readResolve() 方法,用instance域替换掉Serialization机制自动生成的实例类对象     private Object readResolve(){ return INSTANCE; }  
最简单直接变态的方法是:找到这个java进程的id(linux下的ps或者windows下的jps),直接kill掉。java虚拟机会立即dump stack trace。
1. 数据库层主要查询建索引     一个是全表扫描,一个是常量时间。通过explain 查询语句就知道了。   2. 通过memcached分布式缓存减少数据库或者磁盘文件IO     原则是把数据缓存到离使用者最近的地方   3. 写操作也可以缓存,如果不要求实时更新到数据库的话。比如把某个页面的点击次数存储到数据库中的话,并不要求每点击一次就写一次数据库,可以积累到10次或者100次的时候再做一次更新。这对用户体验影响不大。(只要不直接读数据库这条记录,也就是要通过缓存的接口取值)   4. Web站点重定向实现的负载均衡Load Balance     镜像站点通过Ht ...
1. 五个基本类型(primitive data type)是: number,特殊的是NaN,Infinity,-Infinity。 NaN(Not a Number)实际上还是Number类型 string boolean undefined,唯一值是undefined null,唯一值是null   2. 其他都是object data type. 包括数组。     3. 需要注意的一点是:所以值都可转化为true(通过!!两次取非)除了以下六个falsy值 "" 0 null undefined NaN false
一. undefined undefined 在Javascript中是数据类型也是值 有两种情况下变量的类型是undefined,即通过 typeof 变量名查看。 1. 未声明的变量 2. 声明过了未赋值的变量    二. null null在Javascript中是数据类型也是值 但如果用 typeof null 看类新的话看到的是 object。null值不是系统默认赋值的,而是programmer手工在代码中赋值的。
学习ClassLoader有几个关注点: From: http://www.ibm.com/developerworks/cn/java/j-lo-classloader/index.html     1. java.lang.ClassLoader 中的关键方法       方法 说明 getParent() 返回该类加载器的父类加载器。 loadClass(String na ...
From: http://jroller.com/sjivan/entry/difference_between_classnotfoundexception_and_noclassdeffounderror     A ClassNotFoundException is thrown when the reported class is not found by the ClassLoader. This typically means that the class is missing from the CLASSPATH. It could also mean that the cl ...

CAS

CAS is an authentication system originally created by Yale University to provide a trusted way for an application to authenticate a user.   CAS is an enterprise Single Sign-On solution for web services. Single Sign-On (SSO) means a better user experience when running a multitude of web services, e ...

OpenID and OAuth

From http://cakebaker.42dh.com/2008/04/01/openid-versus-oauth-from-the-users-perspective/     In this article I want to show the differences between OpenID and its younger cousin OAuth by providing for each a typical user scenario. First the scenario for OpenID: User wants to access his account ...
1. in-memory replication   2. database based session     一个具体的Case是购物车程序中购物车,选择的商品放到session中的管理。
1. Web Servlet Container之线程池     一个request会有一个线程来处理,Servlet实例只有一个,因此servlet需要考虑多线程问题。      Thread Pool Size需要设置合理。太小浪费CPU处理能力。   2. SLSB之与对象池
Global site tag (gtag.js) - Google Analytics