Whisht Wind


« 二月 2010
星期日星期一星期二星期三星期四星期五星期六
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
      
       
今天

Subscribe

Add to My YahooSubscribe in RojoSubscribe in NewsGator OnlineThis blog's XML feed
Subscribe with BloglinesAdd to Google

Search this blog

Blog Roll

Downloads

Other Links

Popular Tags

addons android archive autoloading autopager china chinese cisco dhcp dict earthquake firefox flock fonts foxbeans hgweb j2me java javame jstardict jstardictm language mercurial milax moon mozilla mtu nb-xul netbeans openoffice opensolaris pack palette recommended solaris stardict tar.gz tar.gz2 vpn vpnclient windows wine xul zip 嫦娥 郑萍如 面板

Weblog menu

Feeds

Recent Entries

Today's referrers

今日点击: 387

Locations of visitors to this page

20070713 星期五 2007年07月13日

Postgresql和Java的相似之处: 关于postgresql vacuum的思考

从学生时代开始,本人就于开始接触数据库,从dBase,foxbase,microsoft access到microsoft sqlserver,sybase sqlserver,db2,oracle到开源的mysql,hsql,derby. 最近有机会接触了一下postgresql。有一个东西给我制造了不小的麻烦,那就是 postgresql不会自动清楚已删除的数据,用户需要定时执行vacuum去做一些垃圾收集及性能优化的工作。如果不做 vacuum那么postgresql基本上是只往数据文件中追加数据,如果数据库包含变动较快的数据,频繁增删的数据,那么postgresql的数据文件就会快速增大,性能也会极速下降,直到vacuum被执行。
在 postgresql的文档中有vacuum的具体使用,这里是英文文档:http://www.postgresql.org/docs/8.2/static/maintenance.html  ,中文文档在这里:http://www.pgsqldb.org/pgsqldoc-8.1c/maintenance.html . 从这些文档中你还可以找到关于autovacuum(自动 vacuum)的描述,建议安装 postgresql之后启用autovacuum。
vacuum这个东西在以前接触的数据库中完全不存在,但是它还是令我有种似曾相识的感觉。那就是java中的内存回收机制。它们都是把资源回收这种我们一般认为要尽早完成的工作放到了一边,等待批量处理。这样做自然有它的好处,但是带来问题也同样多。难道它们就不能采取一些更有进取精神的方案吗?谁知道呢,但是无论如何它们在各自的领域都还取得了不可否认的成功。
这让我又想起了英报全球十大在建建筑中对央视电视塔的评价:这样的建筑不能太多。

Technorati Tags: ,

( 2007年07月13日, 08:51:20 上午 CST ) [Listen] Permalink 评论 [0]

Share and enjoy:  Bookmark it with Blinklist Submit to Bloglines Bookmark it with Blogmarks Track with co.mments Bookmark it with Del.icio.us Submit it to Digg Submit it to Fark Bookmark it with Furl Bookmark it with Ma.gnolia Bookmark it with Maple Bookmark it at NewsVine Bookmark it at reddit.com Bookmark it at Simpy.com Bookmark it with Spurl Submit it to slashdot Track with TailRank See who links to it via Technorati Bookmark it with wists

评论:

发表一条评论:
  • HTML语法: 禁用