123
 123

2008-01-24 Thu

22:30 Oracle Standby Recovery Rate Monitoring (0 Bytes) » del.icio.us/fenng/oracle
19:34 最近看的几本书 (1634 Bytes) » Fenng's shared items in Google Reader

Founders at Work
数十位来自互联网和软件开发等企业的创始人,谈他们创业初期的经历,对想创业或者在创业的人,都是值得一读的一本书。你可以从中获得三种东西,经验、鼓励和乐趣。

十年一觉电影梦
李安的故事告诉了我们,三十六岁以后再开始也是有戏的:P。虽然讲的是拍电影,比如“平常在班上滔滔不绝、分析电影头头是道的人,一拍片,你不敢相信是同一个人,那么简单的事情,他都反应不过来。我这才知道,读理论和拍片根本是两码事,是两种不同的才分”,但是这种事,好像搁哪都挺对。

2010太空漫游
看《2001太空冒险》居然已经是二十年前的事情了,还好赶在2010年前把这本看了。引进的台湾译本,翻译质量可以保证,封面设计也很酷。

19:30 基于角色的访问控制,第 3 部分 (259 Bytes) » developerWorks : AIX 专区的文章,教程
在本系列文章中,我们将向您陆续介绍并和您一起讨论基于角色的访问控制(Role Based Access Control)的相关内容。作为 AIX 6 的安全新特性,RBAC 为用户提供了细颗粒度的,更加灵活的安全管理方法。
19:30 AIX 6 系统工作负载分区(System WPAR)管理指南 (217 Bytes) » developerWorks : AIX 专区的文章,教程
工作负载分区 (WPAR) 是 AIX 6 提供了一种全新的虚拟化技术。WPAR 技术为企业构建虚拟 IT 基础设施提供了强有力的支持。本文着重介绍了系统 WPAR 的管理和使用方法。
19:28 Linux-based NAS 扩展到 4 bays (2781 Bytes) » Fenng's shared items in Google Reader
写在前面:给 2008 的一个承诺就是多写写 Simple NAS 和嵌入式 Linux,就让这个帖子作为 NAS 的开端吧。

LinuxDevices 的消息,Qnap System 推出了 4-bay 的 NAS —— TS-409 Pro Turbo,这里是其规格:
  • Processor — Marvell 5281 500MHz
  • Memory — 256MB DDR2 RAM; 8MB flash
  • Hard drive capacity — 4 x 3.5-inch SATA I/II drives (not included), up to 4TB internal, RAID 0/ 1/ 5/ 6/ 5+ support
  • LAN port — 1 x gigabit Ethernet (RJ-45)
  • USB — 3 x USB 2.0 (support printer, disk, digital camera, pen drive, card reader, and USB hub)
  • LEDs — USB, status, eSATA, HDD, LAN, power
  • Dimensions — 8.9 x 6.9 x 7.4 inches (225 x 176 x 188 mm)
  • Operating system — Linux (unspecified version)
这款产品是 TS-109/TS-209 的升级版,支持的硬盘数量从一颗到两颗,再到 TS-409 的四颗,最多支持到 4TB,这就是这个产品最大的卖点,NAS 的一个至关重要的参数还是最根本的看容量,其次应该是稳定性、性能和功能融合能力。

我感兴趣的一些地方:
  •  我目前在玩的 Processor 是 Marvell 5181,TS-409 使用的 5281 应该是其升级了。
  •  8MB Flash 能放下多少东西?我比较感兴趣这台 NAS 支持哪些扩展功能,这些没有在 LinuxDevices 新闻里出现。BT/HTTP/FTP downloader? UPnP AV media server? Web Station?... 我会继续跟进这款产品,应该会有一些更新。
  •  256MB DDR2 RAM - 我很羡慕这个数字。我玩过的最高记录是 64MB,但主要的还是 32MB,汗。RAM 搞大一点,性能会提高不少,这可能是 NAS 发展的一个趋势。
  •  现在的 NAS 都是 SATA HDD 和 Gigabit Ethernet 了,IDE 被淘汰,毫无悬念。一个还没有出现的潜在趋势:随着 SSD 的提高与普及,Simple NAS 迟早也要支持的。Fenng 就提到 EMC 已经在其产品上应用 SSD 了,虽然那是在高端 NAS 上面。
  • 没有 Wireless。一般来讲,Wireless 是 router 的功能。NAS 连到带有 Wireless 的 router 上,也有可以无线访问了,要 NAS 本身带有 Wireless,似乎不太必要,况且现在 Wireless 几乎成了 router 的标配。我曾经做过一段 Wireless for NAS,虽然该型号终於夭折。

--
每一个不曾起舞的日子都是对生命的辜负。
Gmail/Gtalk: jick.nan@gmail.com
19:18 Sucks v.s. Rocks (16978 Bytes) » Fenng's shared items in Google Reader
类别 Sucks Rocks 网址
内容管理 SharePoint Plone http://www.plone.org
邮件群发 Lyris OpenEMM http://www.openemm.org
操作系统 RHEL Ubuntu http://www.ubuntu.com/
网站服务 Apache lighttpd http://www.lighttpd.net/


nginx http://nginx.net/
开发语言 Perl Python http://www.python.org
开发框架 RoR Django http://www.djangoproject.com/
虚拟环境 VMWare XEN http://www.xen.org/


KVM http://kvm.qumranet.com/
管理工具 SecureCRT PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/
办公软件 Microsoft Office OpenOffice http://www.openoffice.org


StarOffice http://pack.google.com

金山词霸 灵格斯词霸 http://www.lingoes.cn/

Internet Explorer Firefox http://www.mozilla.com

Outlook Foxmail http://www.foxmail.com.cn/

Password 2000 Keepass http://keepass.info/

MindManager FreeMind http://freemind.sourceforge.net

PhotoShop GIMP http://www.gimp.org
媒体工具 DivX VLC http://www.videolan.org/

Media Player foobar2000 http://www.foobar2000.org/

ACDSEE Picasa http://pack.google.com
数学工具 Matlab Scilab http://www.scilab.org/


Octave http://www.gnu.org/software/octave/
18:07 How a Default iPhone 1.1.3 Looks to Nmap 3.50 (1293 Bytes) » Fenng's shared items in Google Reader

This is an nmap (3.50) scan of all 65,535 TCP ports on a default, non-hacked 1.1.3 iPhone. The scan was performed from an OS X system (MacPorts) sitting adjacent to the iPhone on a wireless network.

It appears there’s just one tcpwrapped service, on port 62,078, and Fyodor has evidently already added the requisite fingerprints since nmap’s OS detection pegged it perfectly as an iPhone.

kairin ~ $ sudo nmap -p 1-65535 -sV -O 10.10.126.2
Starting Nmap 4.50 ( http://insecure.org ) at 2008-01-24 20:50 PST

Interesting ports on 10.10.126.2:
Not shown: 65534 closed ports
PORT      STATE SERVICE    VERSION
62078/tcp open  tcpwrapped

MAC Address: 00:1C:B3:70:6A:DA (Apple)
Device type: phone|media device
Running: Apple embedded
OS details: Apple iPhone mobile phone or iPod Touch (Darwin 9.0.0d1)
17:11 ociuldr更新(2008/01/25) (4394 Bytes) » AnySQL.net

作者:AnySQL, 发布在anysql.net

    到现在为止, 免费文本导出小工具(ociuldr)的累计下载次数已经突破5000次, 已经有很多的知名的大公司, 选择下载源代码, 进行编译和使用, blue_prince在阿里巴巴更是创下了导出文本速度的新记录.

    而我大约是这个工具的最大用户吧, 昨天花了二个小时, 给数据仓库组导了10亿条记录, 在导的过程中发现了一个无关紧要的小问题, 当文字类型字段不是从表中直接来时, 可能会分配过多的内存. 如下所示.

C:\>ociuldr user=test/test query="select '' from dual"
1638450 bytes allocated for column '' (1)

       0 rows exported at 2008-01-25 08:39:37
       1 rows exported at 2008-01-25 08:39:37
         output file uldrdata.txt closed at 1 rows.

    引起这个问题的原因是由于OCI接口不能正确地估计返回字段的长度, 在以前的测试中没有试这种占位列,因此没有发现.

C:\>ociuldr user=test/test query="select '' from dual"
  200050 bytes allocated for column '' (1)

       0 rows exported at 2008-01-25 08:42:56
       1 rows exported at 2008-01-25 08:42:56
         output file uldrdata.txt closed at 1 rows.

    对于这个小问题, 你可以不理, 当然如果心里觉得不爽, 就下载新的吧!

相关文章 | Related Artiles

评论这篇文章(3)

15:55 Movable Type 4.1: Power to the People. (10650 Bytes) » Fenng's shared items in Google Reader

Here's the story: Movable Type 4.1 continues the amazing momentum that the Movable Type platform showed in 2007, when we released MT4, offered up the one-two punch of the Enterprise Solution and Community Solution, and capped off our best year ever with the release of MTOS, Movable Type Open Source.

So what's next? Movable Type 4.1, a free update for all users of MT4. A stable release of Movable Type Open Source. The new Professional Pack, packed with industrial-strength content management power. And a new personal license for the MT Community Solution. More power, more potential, and more personalization. There are dozens of new features in MT 4.1, and even more unique capabilities if you opt to add on one of the packs we've made available to the community. Improvements for writing and managing assets make MT easier to use than ever, smarter tools for managing and create templates make MT's publishing even more powerful, technical improvements to APIs and the templating language extend MT's tradition of technological innovation, and support for user avatars and new add-ons for community features help turn your MT-powered site into a real community.

And then there's the new add-ons, like the Professional Pack which gives you the ability to customize the data fields for your entries, pages, users, and even categories and folders. Bundled with the smart new Universal Template set, you can build a business website in minutes, and completely control the entry forms you use to publish. Plus, the Community Solution, which we announced to a fantastic response late last year, will shortly be available for personal users, letting you add forums, profiles, user-submitted posts and more to your blog, all wrapped up in a gorgeous new set of specially-designed templates.

  • Write. Now. We've cleaned up the screen where you write your entries, making the layout even smarter and easier to understand, and showing useful info like when a post was created as well as when it was published, and even if it's been edited, which is handy if you've got multiple people reviewing your content. There's even a convenient link for sharing your entries once they're published, with a friendly box for entering your recipient's email addresses, and automatic integration with MT's address book.
  • Template Sets. The smartest templating system in blogging just got even smarter -- you can now install entire sets of templates, which control the output of your published content, styles, and even your XML feeds all at once. The Professional Pack (see below) includes a killer template set, but you'll be able to get template sets from the MT community at large, as well. And with new plugins, you can even create and distribute or sell your own sets. Learn more about Template Sets.
  • Template Sanity! Ever drive yourself nuts trying to look up the right tag to use in your templates, or get frustrated trying to share elements between your different blogs or sites? No more. Global templates make it easy to share widgets or even entire templates between two, twenty, or two hundred different blogs or sites in your MT install. And intelligent tag help automatically provides you with a link to the appropriate help documentation for the template tags you use -- right within the Movable Type interface. And all that is on top of MT4's smart syntax-highlighting rich template editor, which even prompts you for the right template tags to insert while you're editing.
  • The best API support in the business. MT was the first blogging platform with Atom support, and now we've got full support for the IETF Atom Publishing Protocol (RC5023) standard. Plus, we've beefed up MT's API support with the ability to create, edit, and manage pages through third-party clients like Windows Live Writer, just like you've been able to do with entries.
  • Get a handle on your assets. Still struggling with an old blogging system that doesn't even help you manage your files and images? Then it's time to jump to MT4.1, which improves MT4's powerful asset management system with new screens that show you every time an asset has been used. ("This PDF is linked to in 3 of your entries." "Two of your pages have this image inserted." "This audio file hasn't been used.") And you can bulk-manage your assets, making it just a few clicks to add tags to as many files as you want.
  • Show us your pics! Short for "User pictures", and also known as avatars, Userpics are built in to the system, and you can use them on your published entries, and even on your comments. And Userpics have all the power of MT4's asset management system, so you can upload, manage, and tag them just like you would any other image or photo in your system. Seeing the faces (or icons) of the members of your community goes a long way towards creating a sense of "belonging", and makes it easy to identify the regulars that help your blog's community thrive.
  • Some crazy next-generation geeky stuff! This one's an experimental feature, just for the geeks: As of MT 4.1, the Movable Type templating language is now Turing Complete. MT 4.1 introduces some new looping constructs, additional variable types (like hashes and arrays) and control flow structures like If-ElseIf-Else). You can finally port Tetris to the MT template language!
  • The whole damn thing is faster, and can take whatever traffic you throw at it. With all the new features in MT4, we've had to work hard to make sure the speed of managing and publishing your site stays peppy. So MT 4.1 introduces a number of new performance enhancements, like blog search results that are significantly more speedy. And as always, MT defaults to publishing standard, scalable plain HTML documents for your entries -- so you can enjoy the attention when your blog gets on Digg, instead of worrying about whether your web host is going to yell at you, or having to figure out a technical solution just to handle the traffic.

But wait, there's more!

As we mentioned with the release of Movable Type Open Source, we want to make sure our paying users know they're getting the most bang for their buck. So we're launching the Professional Pack, a benefit for all users who purchase a supported commercial license. And soon, it will be joined by a new personal license for the Community Solution, that makes it easy for you to get the power of full-featured forums, rich community blogs, and slick new member profiles for your personal blog. (In the meantime, you can check out the screencast to find out what's in the Community Pack.)

Packed With Power

The Pro Pack lets you flex your creative muscles with MT, turning the world's most powerful blogging platform into a full-fledged content management system. Some of the highlights:

  • Universal Template SetUniversal Template Set for Business Websites. Your company or project can get up and running with a professionally designed website using MT's new content management features using the new universal template set. Just click to start a new site and you're automatically provided with a beautiful homepage, default pages for common information like an About page or a Contact page, and a full-featured blog. Even better, you can start customizing the content of any section of the site just by clicking on it.
  • Custom Fields. Now you've got complete control over the fields that you use to publish your site. Extend your entries and pages with drop-down lists, radio buttons, or just plain text fields. Add additional fields to your author's profiles, giving you more information about the contributors on your site. And you can even tweak the fields used to describe your system's folders and categories, storing any details you want to keep track of. Plus, field customization even extends to letting you easily rearrange the fields in any posting form through drag-and-drop, so you can make sure authors have the easiest experience possible.

Thank You

We've been thrilled by the incredible amount of support and attention that the community's given to MT, especially during the MT 4.1 beta. The hard work has paid off -- the launch of MT 4.1 also marks the first official stable release of Movable Type Open Source. But most of all, as we said with the launch of the MT4.1 Beta, it's just getting started. After more than six years, it's exciting to see that Movable Type is still helping you do amazing things by putting the power of personal expression into the hands of an amazing community

15:26 狗仔日 (13499 Bytes) » Fenng's shared items in Google Reader


1月23日这一天发生了很多大事,比如朱元璋建立了明朝,布哈林被判处死刑,中央政府决定军队介入文革,《红与黑》的作者司汤达老师呱呱坠地,北京音乐台建台……在这一天也发生了很多不起眼儿的事情,2008年的1月23日,北京的一群狗仔队们人模狗样地聚集在女人街的一家饭馆,相互舔舐,交流他们做狗仔队的心得。我有幸旁听,感觉比《论语心得》精彩。所以,今天这篇博客,就谈谈狗仔队,我们身边的狗仔队。

我跟这次狗党们聚会的发起人马健龙说:今天是明星的节日,他们不会担心有人跟踪,因为北京的狗仔队们今天都到齐了,那边的明星在夜幕下可以肆无忌惮了。今天是狗仔日,每次狗仔日,都是明星的节日。

我跟马健龙认识是在21世纪初,如果你在球场上见到小马,会当成郝海东。他供职于《天津日报》,现在是驻北京记者站主任。在我国天津,出来两个跟狗有关的名牌,一个是狗不理包子,一个是狗仔队的队长卓伟。在我看来,马健龙老师对卓伟老师的影响很大,小马是藏在狗仔队幕后的策动者。我跟小马每次聊天,谈的都是新闻理想啥的,有一次他开车从天津送我回北京,聊了一路,他希望做一个真正的记者。但是在中国,做一个真正的红包记者很容易,做一个真正的记者很难。

我接触卓伟还是在张艺谋拍《十面埋伏》的时候,他跟冯科联手把电影的人物造型和情节曝光,弄得老张很生气,卖盒饭的张伟平也很生气。所以我就去采访卓伟跟冯科,后来这篇报道没有发。那时候,卓伟跟冯科刚刚踏入狗仔队的行列,第一件事就干得很漂亮。

我跟冯科认识还是在2001年,那时候我在瞿优远老师的《体坛周报》打工,冯科是瞿老大的司机。在此之前冯科是湖南射箭队的队员,有一次训练的时候不小心射死了一头华南虎,害的周正龙找不到证据了,只好弄了一幅年画糊弄大家。湖南省体委认为事情很严重,副局长熊倪勒令冯科退役。说熊和老虎都是森林中的哺乳动物,你射死了老虎就是对熊的不尊重,所以我姓熊的不能答应,退役吧。正好这时候冯科碰上瞿优远老大到湖南体委办事,瞿老大问冯科,你要不要跟我混,冯科说:只要有肉吃我就跟你走。瞿老大拍了拍冯科的肩,冯科就听他的安排了。

有一次马健龙认识了冯科,聊天中得知冯科以前是射箭的,便说,你瞄准不错吧,要不你去当狗仔队吧,端相机肯定很稳当。马健龙拍了拍冯科的肩,冯科又一次听了别人的安排。在卓伟的带领下,冯科冒着被剧组的人扔进河里的危险,河里来水里去,终于成为一名到中流击水,浪遏飞舟的狗仔队。

卓伟创造了大陆狗仔队的历史。马健龙说:“以前我到处乱跑,卓伟天天煲电话粥,所以他的稿发的比我多,我特别不平衡。后来卓伟干了狗仔队之后我就特别佩服他。以前我还有种意识,采访的时候跟明星交朋友,后来我明白了一个真正的记者是什么,就是他永远是一个独立的观察者,像影子一样观察着娱乐圈,而他从来不跟这些明星交朋友,交了朋友就没法干这事了。很多人觉得自己在娱乐圈有几个明星朋友而感到牛逼了,而卓伟因为在娱乐圈里八年而没有一个朋友而牛逼了。”

王小渔我以前不认识,但是他的名声早已与巩俐齐飞,至少在我看来是这样。

我说说我对狗仔队的理解,以前我看过两本书:《我是帕帕拉齐》《虚伪者的狂欢节》,这两本书让我明白了一件事,大众心理真正需要的是什么。除了股票的涨跌让大众肝颤,就是八卦让大众狂欢。我觉得社会需要狗仔队,他们做到了一种制衡关系,让这个社会更和谐了一些。

大多数人对狗仔队缺乏一种真正的认识,认为他们是下三滥,偷鸡摸狗,不是真正的记者。事实上,真正的记者哪个是西装笔挺地毫无阻碍走入一个被采访者家里,然后把人按在座位上顺利采访的?这样的采访是个局。一篇好的采访,都是用麻烦换来的。很多社会记者用偷偷摸摸的方式报道真相,我们都很佩服他们,因为他们体现出一种社会责任。但是一名狗仔队用偷偷摸摸的方式报道真相,我们的脑海理会浮现出一张丑陋的嘴脸,因为他们的真相没有让人看到社会责任的存在。这就像很多人嫖娼一样,爽了之后还要鄙视妓女。当你看完一篇八卦新闻,好奇心在获得极大满足之后,一定还会骂一句这个狗仔队真不是东西。其实不是东西的可能是那个明星。事实上狗仔队并没有直接去体现社会责任,但你想想,没有狗仔队,这些明星中就会有人蹦到天上,成为公害。

 我们普通记者可能关注的是一个明星外在的东西,而狗仔队则关注他们的动作。在一个到处都充斥着谎言的社会,狗仔队所起到的作用就是尽可能揭露一些真相。王小渔说:“所谓娱乐圈里没有真正的真相,我们只是逼近真相。”另一个狗仔队(名字没听清楚)说:“其实一开始我不喜欢狗仔队,违背我从小受到的教育的原则。慢慢觉得做狗仔队挺好的,我们对娱乐圈有威慑力量。”一个叫小姚的狗仔队说:“相机我用了很多年,但是感光度我从来就没用到过3200。后来发现经常会用到这个感光度,干了这么多年摄影,没想到照片会这么拍,我觉得我们比跑会拿红报的记者更有意思。”王小渔说:“我们不仅要挑战相机感光度极限,还要挑战人对娱乐理解的极限,挑战娱乐圈规则的极限。”

狗仔队应该是最好的记者,他们执着、敬业、吃苦耐劳、有奉献精神,比起大多数记者,劳动强度是很难想象的。卓伟为了拍到汤姆·克鲁斯,在草窠里趴了十多个小时,已经快跟邱少云差不多了。他们为了求证夏雨跟高圆圆是否真的好上了,整整盯了3个月,终于把他们俩盯的住到一块去了。卓伟跟另一个狗仔队一直盯了一个星期才把胡紫薇从家里盯出去,而冯科同学还在此次盯梢中不小心开车撞破了头,在家歇了一周。

老板们聚会的时候会说:“你最近又收购了哪家公司?”
白领们聚会的时候会说:“你最近买没买LV新出的那款皮包?”
城市中产者聚会的时候会说:“你最近买了哪只股票?”
而狗仔队们聚会的时候会说:“你们明天头条是什么?”一个说:“那英跟她男朋友。”另一个说:“我们是赵薇跟王励勤。”

历史留下来的都是那些戏剧性的故事,人类自从有文字记录以来,不同年代的人用不同的方式在书写那个时代的八卦,在一个用名声可以换来金钱的今天,有狗仔队难道不正常吗?

所以,很多娱乐公司都会把现今活跃的狗仔队照片贴在墙上,时刻提醒那些刚刚入道的艺人,记住这些脸!你要是堂堂正正的话担心个啥?你真的会相信明星可以做到自律吗?明星作为社会上的一类群体,他们享受着因为媒介传播给他们带来的名声,并且很享受这些,同时还能带来更大的经济利益,由此让他们在公众中产生一种特权,这种特权有时会超越法律和规则。同样是劳动付出,普通人却享受不到。因此,让这些明星减少点私人空间,换回名利,算是一种能量守恒转换,没什么亏的。后面有个尾巴盯梢,那是你的光荣。

我在参加这个聚会之前,很好奇这些狗仔队在干这种偷偷摸摸的事情时是否会有安全问题。马健龙老师说:“这个安全建立在新闻真实性的基础上。为什么很多娱乐记者摊了很多官司?是因为让人抓住把柄了,你报道的新闻是不真实的,他抓住了就会有勇气去办你。但是狗仔队就是坚持新闻的真实性,就是所见所闻所得。所以明星心虚,他们不敢拿假的东西对抗真的东西。”卓伟说:“威胁的少,求得多。但我不会听他们的话的。我认为,在坚持新闻真实性的前提下,不懂得新闻看点和卖点的记者不是好记者。比如□□□是否结婚八年?她实际上就是被人包养的。如果我写她被人包养,那很轰动,我也知道,但是没有证据,所以没法写。”

狗仔队一定要抓住明星的命根,这样明星就没办法了。冯科说:“我就是《甲方乙方》里的那种流氓无产者的心态:‘你告我啊!’”

你可能会说,明星也是人(这是小强老师的口头禅),卓伟说:“中国老百姓有一种不好的心理,总是把一些名人跟道德完人划等号,总觉得在事业上取得成功的人在道德上也是完美的。其实恰恰相反,很多取得成功的人都是很肮脏的。我觉得他们的伪装就应该剥去,就应该暴露出一些真相,娱乐圈就是充斥着一些谎言,比如□□不承认跟□□,不承认是第三者,后来我们盯着盯着他们一起就回公寓了。”

王小渔说:“我不想把狗仔队这个职业说的有多高尚,在中国,高尚不见得就是美丽、完美的东西。这个社会有些东西你是不能要求平等的,我们觉得自己做得正确就行了。今年有两件事,一个是□□在建外跟一个女的亲嘴,登到网上,先是□□见到之后暴跳如雷,之后有一个女的出来顶包,说我就是这个女的,我是□□同事,我们在一起,但是没有亲。其实我们拍到他们抱在一起亲了,但我一看这女的不是我那天看到的那个女的。如果我想创造新闻点的话,我会跳出来说她不是。但我觉得我把这个信息传递出去就行了,老百姓会有一半人骂记者,有一半人会骂□□。可我就是想告诉你他们俩在那儿亲了,你爱信不信爱立信。还有那个□□□,他就是在钱柜那里跟人激吻八分钟,那个程度我们都把快门放到4秒钟拍,拍出来都不虚。他说他没亲,那个人不是他。他作为一个明星,还在博客上骂什么狗仔,什么被你们利用了。我站在他的角度会想,他回家之后老婆会跟他闹离婚,所以我就是把我见到的东西呈现出来就行了。你说,要是咱们是明星的话,这种事咱们就不干吗?也不见得。”

事实上,现在的很多明星、经纪人、娱乐公司老板很喜欢狗仔队,因为这个很吸引眼球,只要不是对艺人毁灭性的打击,他们都很开心,这样可以轻易上到新浪网的娱乐头条,而且省去向新浪的娱乐编辑送的一笔数额不小的红包。其实狗仔队、大众、明星(演艺公司)三方都是获利者,是吉祥三宝的一家。可是你再仔细想想,最大的获利者是谁?还不是那些明星和演艺公司吗。当黄健翔因为一个记者的报道让他感觉不爽站出来骂街的时候,我们都该想想,凭什么婊子牌坊都让他一个人占去啊?事实告诉我们,他最终是一个获利者。既然如此,下次再遇到这样的事情,就请你Shut你的Up。

那天聚会的很多狗仔队大都供职于新浪搜狐两家网站,这些狗仔队牛逼的是,他们都相互掌握了对方网站高层领导的八卦,IT行业为了利益造成的门户对立常常使他们剑拔弩张,互为攻讦。我估计以后要是把这些网站逼急了,说不定真的动用狗仔队出场,想想就够刺激的。

我能想象得出,狗仔队的非正常生活是什么样子的,每当夜幕降临,他们消失在夜色中,过着黑夜比白天多的生活。王小渔的太太这样说:“人生本来很平淡的,因为有一个狗仔老公而变得很精彩。”

你可能会说,他们说的话都是真的吗?这次聚会是真的吗?又是你虚拟出来的吧?我实话告诉你,那天聚会,我坐在卓伟跟王小渔中间,我坐下后的第一件事就是把录音笔拿出来,按下录音键,然后放在手机下面,把整个聚会过程都录下来了。我是狗仔中的狗仔。

我不知道他们是否注意到我拿出录音笔这个细微动作了,也许他们都看到了,并且暗自发笑:王小峰,你中了我们的奸计!

注:文中出现的□□部分请大家自由填空。

11:31 如何确定导致刷新组刷新失败的物化视图(二) (720 Bytes) » yangtingkun
当系统中存在多个物化视图,使用刷新组会大大简化物化视图的刷新,只需要将同一时间同步的物化视图全都放到一个刷新组中既可。在9i中,使用刷新组方便的时候有一个缺点,如果其中一个物化视图报错,Oracle给出的错误信息并没有说明是哪个物化视图出了问题。这篇文章描述一种对于各种情况均适用的方法。如何确定导致刷新组刷新失败的物化视图(一):http://yangtingkun.itpub.net/post/468/452773上一篇介绍了本地物化视图如何定位刷新失败的物化视图,方法很简单,可惜不适用于通过数据库链建立的物化视图。看下面的例子:SQL> CONN YANG...
11:31 如何确定导致刷新组刷新失败的物化视图(二) (720 Bytes) » yangtingkun
当系统中存在多个物化视图,使用刷新组会大大简化物化视图的刷新,只需要将同一时间同步的物化视图全都放到一个刷新组中既可。在9i中,使用刷新组方便的时候有一个缺点,如果其中一个物化视图报错,Oracle给出的错误信息并没有说明是哪个物化视图出了问题。这篇文章描述一种对于各种情况均适用的方法。如何确定导致刷新组刷新失败的物化视图(一):http://yangtingkun.itpub.net/post/468/452773上一篇介绍了本地物化视图如何定位刷新失败的物化视图,方法很简单,可惜不适用于通过数据库链建立的物化视图。看下面的例子:SQL> CONN YANG...
10:52 Prediction: SSD Blades in 2008 (2876 Bytes) » Fenng's shared items in Google Reader

Prediction.

In mid-2008 (early 2009), one of the major hardware vendors (IBM, Dell, Sun, etc) will ship a blade server with all SSD.

The key will be that the blade itself will be a LOT smaller (by about 20-30%) since power consumption and dissipation is reduced. They’re also going to take advantage of the low form factor of SSD to fit more disks per box. Probably in the 4-8 disk range.

The system itself will have less memory than conventional systems since SSD is so fast.

This is going to further dampen the 1U form factor.

These boxes might also be half depth (ALA Rackable) to allow back to back mounting.

10:35 FUDCon video: New face of Fedora (1485 Bytes) » Red Hat Magazine

One of the major announcements at the recent FUDCon was the changeover in Fedora Project leadership. Max Spevack, the outgoing project manager, sat down with incoming Fedora chief Paul Frields (a familiar face to magazine readers, as he’s a popular contributor). Couldn’t make the conference? Catch up now instead.

Download this video: [Ogg Theora]



10:29 Enum Fields VS Varchar VS Int + Joined table: What is Faster? (48078 Bytes) » MySQL Performance Blog

Really often in customers' application we can see a huge tables with varchar/char fields, with small sets of possible values. These are "state", "gender", "status", "weapon_type", etc, etc. Frequently we suggest to change such fields to use ENUM column type, but is it really necessary (from performance standpoint)? In this post I'd like to present a small benchmark which shows MySQL performance when you use 3 different approaches: ENUM, VARCHAR and tinyint (+joined table) columns.

In practice you can also often use 4th variant which is not comparable directly, which is using integer value and having value mapping done on application level.

So, first of all, a few words about our data set we've used for this benchmark. We have 4 tables:
1) Table with ENUM:

SQL:
  1. CREATE TABLE cities_enum (
  2.   id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  3.   state enum('Alabama','Alaska','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District of Columbia','Florida','Georgia','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri') NOT NULL,
  4.   city varchar(255) NOT NULL,
  5.   PRIMARY KEY  (id),
  6.   KEY state (state)
  7. ) ENGINE=MyISAM;

2) Table with VARCHAR:

SQL:
  1. CREATE TABLE cities_varchar (
  2.   id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  3.   state varchar(50) NOT NULL,
  4.   city varchar(255) NOT NULL,
  5.   PRIMARY KEY  (id),
  6.   KEY state (state)
  7. ) ENGINE=MyISAM;

3) Table with INT:

SQL:
  1. CREATE TABLE cities_join (
  2.   id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  3.   state_id tinyint(3) UNSIGNED NOT NULL,
  4.   city varchar(255) NOT NULL,
  5.   PRIMARY KEY  (id),
  6.   KEY state_id (state_id)
  7. ) ENGINE=MyISAM;

4) Dictionary table for cities_join:

SQL:
  1. CREATE TABLE IF NOT EXISTS `states` (
  2.   `id` tinyint(3) NOT NULL AUTO_INCREMENT,
  3.   `name` char(40) NOT NULL,
  4.   PRIMARY KEY  (`id`),
  5.   UNIQUE KEY `name` (`name`)
  6. ) ENGINE=MyISAM;

All cities_* tables have 1,5M records each and records are distributed among 29 different states (just happens to be data we had available for tests)

Two important notes about this table before we get to results - this is rather small table which fits in memory in all cases (and dictionary table does too). Second - the rows are relatively short in this table so changing state from VARCHAR to ENUM or TINYINT affects row size significantly. In many cases size difference will be significantly less.

All tests are runned 1000 times and the result time is average from those 1000 runs.

So, our first benchmark is simple: we need to get 5 names of cities, located in Minnesota and, to make things slower, we'll take those records starting from record #10000 making MySQL to discard first 10000 records.

1) Results for ENUM:

SQL:
  1. SELECT SQL_NO_CACHE city FROM cities_enum WHERE state='Minnesota' LIMIT 10000,5;
  2. Result time(mean): 0.082196

2) Results for VARCHAR:

SQL:
  1. SELECT SQL_NO_CACHE city FROM cities_varchar WHERE state='Minnesota' LIMIT 10000,5;
  2. Result time(mean): 0.085637

3) Results for INT + join:

SQL:
  1. SELECT SQL_NO_CACHE c.city FROM cities_join c JOIN states s ON (s.id = c.state_id) WHERE s.name='Minnesota' LIMIT 10000,5;
  2. Result time(mean): 0.083277

So, as you can see, all three approaches are close with ENUM being fastest and VARCHAR few percent slower.

This may look counterintuitive because table is significantly smaller with ENUM or TINYINT but in fact it is quite expected - This is MyISAM table which is accessed via index, which means to retrieve each row MySQL will have to perform OS system call to read the row, at this point there is not much difference if 20 or 30 bytes are being read. For Full Table Scan operation difference often would be larger.

It is also interesting to note performance of Innodb tables in this case: for VARCHAR it takes about 0.022 per query which makes it about 4 times faster than for MyISAM. This is great example of the case when Innodb is much faster than MyISAM for Read load.

The other surprise could be almost zero cost of the join, which we always claimed to be quite expensive. Indeed there is no cost of the join in this case because there is really no join:

SQL:
  1. mysql> EXPLAIN SELECT SQL_NO_CACHE c.city FROM cities_join c JOIN states s ON (s.id = c.state_id) WHERE s.name='Minnesota' LIMIT 10000,5 \G
  2. *************************** 1. row ***************************
  3.            id: 1
  4.   select_type: SIMPLE
  5.         TABLE: s
  6.          type: const
  7. possible_keys: PRIMARY,name
  8.           KEY: name
  9.       key_len: 40
  10.           ref: const
  11.          rows: 1
  12.         Extra:
  13. *************************** 2. row ***************************
  14.            id: 1
  15.   select_type: SIMPLE
  16.         TABLE: c
  17.          type: ref
  18. possible_keys: state
  19.           KEY: state
  20.       key_len: 1
  21.           ref: const
  22.          rows: 225690
  23.         Extra:
  24. 2 rows IN SET (0.10 sec)

Because we refer state by name, which is unique,it is pre-read and query executed basically on single table querying state by ID.

Next test was a result of my curiosity. I've tried to order results by states.

1) Results for ENUM:

SQL:
  1. SELECT SQL_NO_CACHE city FROM cities_enum ORDER BY state LIMIT 10000, 5;
  2. Result time(mean): 0.077549

2) Results for VARCHAR:

SQL:
  1. SELECT SQL_NO_CACHE city FROM cities_varchar ORDER BY state LIMIT 10000, 5;
  2. Result time(mean): 0.0854793

3)

SQL:
  1. SELECT SQL_NO_CACHE c.city FROM cities_join c JOIN states s ON (s.id = c.state_id) ORDER BY s.name LIMIT 10000,5;
  2. Result time(mean): 26.0854793

As you can see, ENUM and VARCHAR show close performance, while join performance degraded dramatically.

Here is why:

SQL:
  1. mysql> EXPLAIN SELECT SQL_NO_CACHE c.city FROM cities_join c JOIN states s ON (s.id = c.state_id) ORDER BY s.name LIMIT 10000,5\G
  2. *************************** 1. row ***************************
  3.            id: 1
  4.   select_type: SIMPLE
  5.         TABLE: c
  6.          type: ALL
  7. possible_keys: state
  8.           KEY: NULL
  9.       key_len: NULL
  10.           ref: NULL
  11.          rows: 1439943
  12.         Extra: USING TEMPORARY; USING filesort
  13. *************************** 2. row ***************************
  14.            id: 1
  15.   select_type: SIMPLE
  16.         TABLE: s
  17.          type: eq_ref
  18. possible_keys: PRIMARY
  19.           KEY: PRIMARY
  20.       key_len: 1
  21.           ref: test.c.state_id
  22.          rows: 1
  23.         Extra:
  24. 2 rows IN SET (0.00 sec)

Because we're sorting by name we have to perform the join for each row to retrieve it. This also means sort can't be done by index and extra sort pass (filesort) is required, which also makes MySQL to store Join result in temporary table to do the sort, all together makes things quite miserable. Note this might not be best execution plan to pick in this case but this is other story.

To avoid part of this problem we of course arrange state ids in the alphabetical order and do sort by state_id, though join cost still could be significant.

And the last test - selecting city and name in arbitrary order, skipping first 10000 rows to make query times longer.

1) Results for ENUM:

SQL:
  1. SELECT SQL_NO_CACHE city, state FROM cities_enum LIMIT 10000, 5;
  2. Result time(mean): 0.003125

2) Results for VARCHAR:

SQL:
  1. SELECT SQL_NO_CACHE city, state FROM cities_varchar LIMIT 10000, 5;
  2. Result time(mean): 0.003283

3)

SQL:
  1. SELECT SQL_NO_CACHE c.city, s.name FROM cities_join c JOIN states s ON (s.id = c.state_id) LIMIT 10000,5;
  2. Result time(mean): 0.004170

As you can see, ENUM and VARCHAR results are almost the same, but join query performance is 30% lower.
Also note the times themselves - traversing about same amount of rows full table scan performs about 25 times better than accessing rows via index (for the case when data fits in memory!)

So, if you have an application and you need to have some table field with a small set of possible values, I'd still suggest you to use ENUM, but now we can see that performance hit may not be as large as you expect. Though again a lot depends on your data and queries.


Entry posted by Alexey Kovyrin | No comment

Add to: delicious | digg | reddit | netscape | Google Bookmarks

07:50 我那可怜的睡眠 (244 Bytes) » OracleDBA Blog---我不在江湖,江湖却有我的传说!

难道我真的和北京时间有3-6小时的时差吗?难道我真的是GMT+11到GMT+14的时区的作息时间吗?我也没出国倒过时差,为什么现在我的作息和别人不一样了?我那可怜的睡眠,你啥时候会好?

06:49 不要预支明天的烦恼 (3594 Bytes) » Ricky's Test Blog

当日事,当日毕 说的就是每天高效的把当天的事情完。
早上起来规划一下当天的事情,轻重缓急分个类,一件一件去完成,晚上回家之前想想今天什么时候没做完,争取做一个妥善的处理,这样工作既高效有有条理。
今天检查一下hotmail信箱,发现Denis老弟转发来的一封信,简单的一个故事预示着同样深刻的道理,不要预支明天的烦恼。

快要过年了,小孩子满怀期盼,到成人却欲说难言。面对年关,相对于儿时单纯的喜悦,心头似乎掺杂了太多的迷茫、忧虑、烦恼……本次早茶,让我们探讨怎样甩掉这些包袱:

不要预支明天的烦恼

有个小和尚,每天早上负责清扫寺庙院子里的落叶。

在冷飕飕的清晨起床扫落叶实在是一件苦差事,尤其在秋冬之际,每一次起风时,树叶总随风飞舞落下。每天早上都需要花费许多时间才能清扫完树叶,这让小和尚头痛不已。

他一直想要找个好办法让自己轻松些。后来有个和尚跟他说:“你在明天打扫之前先用力摇树,把落叶统统摇下来,后天就可以不用辛苦扫落叶了。”小和尚觉得这真是个好办法,于是隔天他起了个大早,使劲的猛摇树,这样他就可以把今天跟明天的落叶一次扫干净了。一整天小和尚都非常开心。

第二天,小和尚到院子一看,他不禁傻眼了。院子里如往日一样是落叶满地。老和尚走了过来,意味深长的对小和尚说:“傻孩子,无论你今天怎么用力,明天的落叶还是会飘下来啊!”

小和尚终于明白了,世上有很多事是无法提前的,唯有认真的活在当下,才是最真实的人生态度。

“怀着忧愁上床,就是背负着包袱睡觉。”人生里有93%的烦恼都不是必须的,它们只存在于自我的想象中,往往不会出现。许多人心里潜藏着一只名字叫做“烦恼”的小蚂蚁,常常放牠出来吃掉自己的难得的快乐。

不用预支明天的烦恼,不用想早一步解决掉明天的烦恼。明天如果有烦恼,你今天是无法解决的,每一天都有每一天的人生功课要交,努力做好今天的功课再说吧!


06:01 林行止:看《聖經》學猶太經濟學 (豆瓣 杭州书虫小组) (7426 Bytes) » Fenng's shared items in Google Reader
林行止專欄 看《聖經》學猶太經濟學

  恒生指數昨天跌去一千三百八十三點○一,跌幅百分之五點四九,幅度不可謂不大(去年三月五日以來最大),期指炒家窩輪賭客,四小時(正式營業三個半小時,加上開市前及收市後各有十五分鐘買賣,合共四小時)內多次生而驟死、死而復生,非常刺激;不過,以近月來─非官准的內地炒家入市以來─多次有如海嘯的市況,股民已見慣風浪,今天的急挫又不算什麼一回事。攤開稿紙(筆者是「大落後」,至今仍用筆寫稿)準備動筆之際,電腦上顯示歐英股市莫不四腳朝天,跌個不亦樂乎,連金價亦挫近二十美元……;在長期升市之後,雖說這種走勢遲早出現,但亦影響心情,此時若細說跌市成因,恐有「幸災樂禍」之嫌,若要強作樂觀之詞,則非筆者所願。那麼,不如談談……。

  一般人甚至是虔誠教徒,都以為《聖經》上所載都是「靈性」而非「庸俗」的物事(他們忘記「屬靈」的教會要靠信徒的捐款才能生存!),誰知大謬不然,《聖經》,尤其是舊約首五卷的「律法」(Torah,希伯萊文,勉強可譯為 Instruction,為〈創世紀〉〔Genesis〕、〈出埃及記〉〔Exodus〕、〈利未記〉〔Leviticus〕、〈民數記〉〔Numbers〕和〈申命記〉〔Deuteronomy〕的總稱*;在新約中,耶穌以正牌救世主身份出現凡間,完全是另一回事),對猶太人的經濟學智慧和經營方法,在不著痕之間,有很多深刻、實用性和生動的描述。讀者若能以俗世的眼光和現實的心態細讀之,當有意外驚喜。

  以電影《出埃及記》而成為家喻戶曉人物的摩西,事實上是世界上早期的經濟研究者之一,他之能打敗法老王(Pharaoh),可說是得經濟研究之功。摩西和法老王鬥法,雖然呼風喚雨,有若《封神榜》、媲美《西遊記》,但大家細心研讀,就可知道摩西熟悉歷史,知道尼羅河氾濫和蝗蟲定期為埃及帶來災難,因此能準確地預測未來十場「災殃臨到法老和埃及」。當然,《聖經》上是通過耶和華的「法力」賦予摩西這種智慧,比如〈出埃及記〉第十章就這樣描述:「耶和華對摩西說,你向埃及地伸仗,使蝗蟲到埃及地上來,喫地上一切的蔬菜……而一晝一夜,耶和華使東風颳在埃及地上,到了早晨,東風把蝗蟲颳了來……。」其實,耶和華和摩西,不過是根據歷史現象準確地預測未來而已;可以想像,如果《聖經》不是一部導人敬畏上帝的書,而是一部紀實或科學的著作,我們當能更直接地看到摩西的研究成就。

  摩西的外父米甸祭司葉忒羅(Jethro),從〈出埃及記〉第十八章的描述中,稱他為「企業管理之父」,他應當之無愧。且看這一段話:「摩西的岳父說……你獨自一人辦理不了,現在你要聽我的話,我為你出個主意,願上帝與你同在……要從百姓中揀選有才能的人,就是敬畏上帝、誠實無妄、恨不義之財的人,派他們作千夫長、百夫長、五十夫長、十夫長,管理百姓,叫他們隨時審判百姓,大事都要呈到你這裏,小事他們自己可以審判,這樣,你就輕省些……。」這段話,是葉忒羅教導摩西如何「權力下放」,所謂十夫長,就是管十個人(職員或人民)的小主管,拾級而上,就是管五個十夫長的五十夫長……,這與現代企管理論並無二致。經過這種安排,摩西亦就用不著「從早到晚地」為老百姓排難解紛,獨攬包青天的角色了。

  〈創世紀〉第四十一章記述約瑟(Joseph)為法老王解夢的故事,其實正是托辣斯(Trust)組織的雛形。故事是這樣的:「法老入夢,夢見自己站在河邊。有七隻母牛從河裏上來,又美好又肥壯,在蘆荻中喫草;隨後又有七隻母牛從河裏上來,又醜陋又乾瘦,與那七隻母牛同站在河邊。這又醜陋又乾瘦的七隻母牛,喫盡了那又美好又肥壯的七隻母牛。」不久之後,法老作第二回夢:「夢見一顆麥子又長了七個穗子,又肥大又佳美;隨後又長了七個穗子,又細弱又被東風吹焦了。這細弱的穗子,吞了那七個又肥又飽滿的穗子。」(「我老曹」最喜歡用這段故事來說明經濟循環自古如此,不可避免),埃及「所有的術士和博士」都不能對這兩個夢作出令法老王滿意的解釋,到了最後,有過良好的詳夢紀錄的階下囚約瑟終被帶來,「七個豐年之後接著七個荒年」,就是他的答案。法老覺得他有智慧,「有上帝的靈在他裏頭」,於是「派他治理埃及全地」。約瑟怎樣解決這個問題?他的做法是在七個豐年裏「把糧食積存在各城裏」,他存積的五穀多得「如同海邊的沙」;到了荒年來臨時,約瑟就「開了各處的倉,將糧給埃及人」。如此這般,解決了豐年過剩荒年匱乏的問題。

  約瑟的做法,開了現代托辣斯的先河,不過,它們的手法雖一,目的互異;鑽石托辣斯戴比爾斯(DeBeers)就是一個明顯的例子─在鑽石「豐收」(供過於求)的年頭不斷吸進,到了「歉收」(求過於供)的時候,才酌量放出。戴比爾斯這樣做的目的僅在調節價格,但其構思源自約瑟操縱五穀供應(進而平衡了其價格),是無可置疑的。

  〈創世記〉第十二章至二十六章,詳細描述了上帝和阿伯拉罕(Abraham)的關係,其中最富啟示性的,筆者以為是上帝和阿伯拉罕立約─上帝並沒有要他成為宗教領袖(阿伯拉罕是世界上第一位主教),但要他擁有無數財富,似乎意味著上帝希望人類不斷創造財富的旨意,事實上,唯有不斷創造財富,人類才能過著上帝所願見的富裕和諧生活,而教友才能不斷捐錢給教會!

  從另一層面看,舊約裏許多事例,都帶著濃厚的右傾(保守)主義思想,這正是自古以來西方神權國家都有獨裁者或極權政府的底因;舊約裏與福利主義「免費午餐」背馳的故事,可說俯拾即是,它們強烈地傳播了「報酬是工作的回報」(「按勞動值」)這一訊息。至於上帝「在東方的伊甸立了一個園子」,這個伊甸園,物產豐饒,應有盡有,但由於得來太易,人類無所事事亦可獲優厚的回報,結果是人類不事生產,「終日所思想的盡都是惡」,飽食終日無所用心因而滿腦子壞主意