学以致用

focus on Python , C++, and some interest in Go and R

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年2月15日

摘要: 背景: 现有一个数据表task,目前已有数据位4000万左右,因为表太大,影响到数据库的操作性能,所以考虑对该task表中的数据进行重新分片。如果是在数据库设计的时候就考虑到这样的问题,可以采用postgresql的分区表,通过表继承以及创建一些trigger或者rules来实现这样的要求。但目前task表中已有大量的数据,所以直接多task表采用继承的方式来实现分片已经不太现实,另外insert到task表中时date_create已有值,但最终的表分区应该按照date_start,date_start只有在后期才会更新,在date_create时date_start为空;上层的应用已经成. 阅读全文
posted @ 2012-02-15 15:37 Jerry.Kwan 阅读(1107) 评论(0) 推荐(0) 编辑

摘要: 编辑/etc/rc.d/rc.localsu -c '/opt/pgsql9.1/bin/pg_ctl start -D /usr/local/pgsql/data -l serverlog' postgres 阅读全文
posted @ 2012-02-15 15:26 Jerry.Kwan 阅读(747) 评论(0) 推荐(0) 编辑

摘要: 可以在crontab中增加如下命令0 2 * * * /opt/pgsql9.1/bin/psql -d taskmanager -U postgres -c "select * slice_data();" 阅读全文
posted @ 2012-02-15 15:23 Jerry.Kwan 阅读(611) 评论(0) 推荐(0) 编辑

摘要: 新的一年的工作计划已经出来了,主要还是负责一些技术的研究和跟进。将所能想到的需要分析的技术点儿罗列如下,以期有所帮助。(1)auto update技术计划分析一下google的omaha和courgettehttp://code.google.com/p/omaha/ http://dev.chromium.org/developers/design-documents/software-updates-courgette http://stackoverflow.com/questions/3711435/has-anybody-used-google-omaha-their-auto-up 阅读全文
posted @ 2012-02-15 15:04 Jerry.Kwan 阅读(278) 评论(0) 推荐(0) 编辑