123
 123

2007-06-23 Sat

15:00 又过生日 (839 Bytes) » Hey!! Sky!

       刚刚没头没脑得忙了一阵,抽空上来转转。2007 年的生日就快过去,没有任何节目,和平常没有任何分别,可能唯一的不同就是今天第一次上通宵 night shift。说来也奇怪,开始还有点小兴奋,很早就赶到公司来了,可能第一次上比较新鲜吧,不过熬到现在的确有点累了。今天一大早就起来开始忙活了,下午想补个觉,却一直无法睡着,处于假寐状态。不过现在倒也不觉得困,只是头有点晕。现在的身体状态真的越来越差了,老是觉得疲惫,真的老了,这不又不知不觉地老了一岁。刚看到新闻,侯耀文同志就这样不知不觉地去了,不知道俺啥时候也就这样,平平淡淡地去了……

09:30 Been there... Done that... (509 Bytes) » The Tom Kyte Blog

I was reading Pete Finnigans blog this morning and ran across "a rant".

A rant I very much can relate to.

One that I myself experience from time to time.

Read this - and especially the last paragraph.

Note to Pete - if this is the first time someone has every written to you in this fashion - you are very lucky :)  I love it when they use sarcasm in "thanking you" as this individual did.

03:30 明天, 去看周云蓬 (1761 Bytes) » DBA notes

©作者:Fenng 发布在 dbanotes.net

周云蓬的那首《中国孩子》因为最近的一系列事件而被纷纷引用。明天就有机会去现场听这位传奇盲歌手演唱啦。其实他比多数人都看得清楚。

时间:2007 年 6 月 24 日晚 21 点
地点:杭州.旅行者酒吧 (西湖区曙光路 176 号)
演出乐队:周云蓬
票价:30元

演出信息来自: 生活在现场

--EOF--

相关文章|Related Articles

评论数量(1)|Add Comments

本文网址:

00:30 Quest Recursive SQL Transformation TechnologyMost recent blog entries (5136 Bytes) » Fenng's shared items in Google Reader

Quest Recursive SQL Transformation technology is an innovative AI technology that simulates human SQL transformation technique. It incorporates a set of transformation rules to transform SQL statements on a section-by-section basis. This replaces the trial and error method used by human to rewrite the syntax of a SQL statement. Each transformation rule in the optimization engine is independent from one another, like a capsule; the rule’s capsule can only be opened when all necessary conditions are satisfied (see figure 6). This guarantees the semantic equivalence of the rewritten SQL statements so that they produce the same results as the original SQL. When a SQL statement is transformed by one rule to produce a new SQL syntax, the new syntax may now satisfy the requirements of another rule, hence transformation action is carried out in a recursive manner (see figure 7).

  Figure 6: Recursive Transformation Engine             Figure 7: Chain Effect of SQL Transformation
(Insert Image)

Let’s take a look at the following SQL statement and use two of the built-in transformation rules to see how this Recursive Transformation works. We will use one rule which transforms the IN condition to an EXISTS condition and than use another rule that does the reverse, changing the EXISTS condition to an IN condition. We will illustrate this with the following SQL statement.

The first two levels of transformation are shown in the left side of figure 8. SQL statements with syntax different from the original can be produced by following a set of transformation rules. You can see that for each rule applied to the SQL statement, the newly transformed SQL will satisfy another rule. And the order in which the rules are processed can result in different SQL alternatives. In this example, the source SQL has gone through two transformation rules executed in a recursive manner. If we do not stop the recursive transformation, the loop will continue infinitely. A total of 4 unique SQL statements (marked by the solid boxes in Figure 8) are generated by the two transformation rules. If each of these SQL statements ends up with a new execution plan, we potentially have three SQL statements that may give us different performance that can be used as a benchmark to the original SQL statement.

 
Figure 8: A SQL statement being transformed by two recursive transformation rules

Actually, implementing a transformation rule requires a more complicated control than it is shown in this illustration. For example, Quest SQL Optimizer has to check whether a set operator (UNION, MINUS, or INTERSECT) is in a sub-query, whether multiple items are in the SELECT list, and etc…. But the beauty of those rules is that they are self-protected, which means that the transformation and conditional checking are encapsulated into a one rule-capsule to prevent generating incorrect SQL statements (SQL statements that do not produce the same result as the original SQL). In our Recursive Transformation Engine, we have a multitude of transformation rules which can handle very complicated situations. The result of the recursive transformation for a complex SQL statement may exceed what you can imagine. For example, some transformation rules can be applied endlessly to transform a SQL statement to another semantically equivalent statement without limitation, so quotas must be used to control the number of SQL alternatives that are generated. 

Today, with our Recursive SQL Transformation Engine, you can explore ultimate potential that a database SQL optimizer can give to speedup your SQL statements.

2007-06-22 Fri

22:30 晕车 (2913 Bytes) » DBA notes

©作者:Fenng 发布在 dbanotes.net

前天晚上从上海坐火车回来,晕车了。一行三个人的座位号来去居然是一样的(我们是到上海才买的回程票),都在最后面。上车就感觉有些不对劲儿,胃不舒服。一路上大部分时间都是趴着,也没睡着。我斜后方有位腐败干部模样的人呼噜打的山响,呼噜呼噜的更让我恶心了,结果还差五分钟到站的时候就吐了,一个呕吐袋都没够。唉,这个难受啊。

晕车是我的老毛病了,小时候更为严重一些,从小到大没少遭罪,上小学的时候还差点出事。也用过不下几十个秘方,几乎都不管用。近乎医学的说法是"与耳中有平衡功能的前庭器官运动感应神经有关",准确的说,我是"晕动症",汽车晕,火车晕,船也晕,飞机更晕,做马车也晕,在人群中,人头晃动,也晕,当然,骑自行车不晕。

每次晕车都要几天才能缓过精神来。

前两天出去 Outing ,提前吃了一片晕车药,倒是反应不是很激烈。这一类的药物基本上是刺激神经的,副作用似乎很大。"饮鸩止渴"

--EOF--

相关文章|Related Articles

评论数量(7)|Add Comments

本文网址:

14:42 Video: Havoc Pennington, Mugshot, and the desktop (1835 Bytes) » Red Hat Magazine
Download this video: [Ogg Theora]
Video by Colby Hoke. Produced by Julie Bryce and Colby Hoke.

You might have seen Havoc (and, yes, that’s his real name) on the pages of Red Hat Magazine, last year or long before that. You can usually catch up with him–and the rest of the emerging technologies engineers–at the Red Hat Summit.

We cornered him in San Diego this past May after his Summit presentation to see just what he had been working on.

When you’re done, sign up for Mugshot’s Red Hat Magazine group. We’d love to have you.


09:36 Log Buffer #50: A Carnival of the Vanities for DBAs (334 Bytes) » Pythian Group Blog
Yes, Log Buffer turns 50 today, as Elisa Gabbert publishes the big five-oh on Eye on Oracle. The big DBA-blog conversation does not stop. Read Log Buffer’s homepage and get in touch to edit and publish one yourself. Thanks to all of Log Buffer’s editor/publishers and all its readers for making it such a success. [...]
06:00 PersonalBrain助你拓展脑力特写 (115 Bytes) » Fenng's shared items in Google Reader
PersonalBrain软件能够像你一样“思考”,它还能帮你搭建出一张独特的思维“蜘蛛网”。
02:22 Oracle补丁3028673,解决单进程占用内存过多的问题 (6099 Bytes) » dba on unix

这个问题最早应当是gototop发现的,那已经是很多年以前的事情了,不过,一直到现在,这个问题其实没有最终解决,所以,这个补丁还是不得不一直打下去。bug描述:

    #  Bugs resolved by this patch in conjunction with APAR IY49415:
    #  -------------------------------------------------------------
    #  3028673:  ORACLE ON AIX DOES NOT SHARE MANY CONST STRUCTS - PER
    #            PROCESS MEMORY OVERHEAD

更详细的信息可以参考metalink Note:259983.1,其实在早先的aix 4.3以及5.1上,当时的解决方案是:

$AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE

$NUM_SPAREVP=1; export NUM_SPAREVP

但是,从aix 5.2开始,以上解决方案不再有效,所以,为了解决这个问题,aix 5.2推出了一个APAR IY49415,在aix 5.3中是查不到这个APAR信息的,但是不表示aix 5.3不支持,而是因为aix 5.3已经完全包含进去了。

AIX 5.2#instfix -a -ivk IY49415

    IY49415 Abstract: read-only reloc linking/loading support 

    IY49415 Symptom Text:
     Programs having large amounts of read-only address constants
     (compared to our competitors binaries of the same programs),
     consume excessive amounts of memory under AIX since it has no
     support to place address constants in read-only memory (text).

    ----------------------------
        Fileset bos.64bit:5.2.0.12 is applied on the system.
        Fileset bos.mp:5.2.0.18 is applied on the system.
        Fileset bos.mp64:5.2.0.18 is applied on the system.
        Fileset bos.rte.bind_cmds:5.2.0.13 is applied on the system.
        Fileset bos.up:5.2.0.18 is applied on the system.
        All filesets for IY49415 were found.

在有该APAR的aix 5.2系统上,或者所有的aix 5.3系统上,oracle推出了一个patch 3028673。打这个patch的方法也很奇怪,不是传统的Opatch方式去打,而是重新relink一个新的Oracle可执行文件,最终目的是通过直接修改源文件,使得oracle的多个进程之间可以共享一部分原来不能共享的资源,这部分资源大致占用1M多的空间。所以,该patch可以使得每个oracle进程降低1M多一点的内存使用,如果在进程特别多,而内存又比较紧张的系统上,这个patch还是非常有效果的。relink的方法为:

    Relink the oracle binary
    ~~~~~~~~~~~~~~~~~~~~~~~~

     1  save your current version of $ORACLE_HOME/oracle
     2  create a working directory $ORACLE_HOME/relink
     3  cd to $ORACLE_HOME/relink
     4  unzip the relinking package
     5  link $ORACLE_HOME/bin/oracle to ./oracle0
     6  run the script ./genscript to generate some required files and scripts
     7  run ./relink.sh to generate the new oracle binary oracle0.new.$$
     8  copy oracle0.new.$$ to $ORACLE_HOME/bin/oracle and verify that the
     permissions match the original oracle binary.

另外,需要特别注意的是,patch中描述为

    #  Patch Special Instructions
    #  ---------------------------
    #  This patch is for AIX 5.2 systems only.
    #
    #  It is valid for all 920* AIX 5.2 systems.

这个是因为当时还没有aix 5.3系统,其实,实际上所有oracle 920系统+aix 5.2/5.3都可以使用这个patch,以下是使用前后的对照表,注意SIZE列,补丁前与补丁后基本相差1M多,如果有1000个进程,就可以节约1-2G的内存使用。

    补丁前$ps gx|grep oracle
        PID     TTY STAT  TIME PGIN  SIZE   RSS   LIM  TSIZ   TRS %CPU %MEM COMMAND
     483436      - A    199:48   12  4804 25876    xx 49801 21136  0.5  0.0 oracletb
     602170      - A    198:55    0  4804 25940    xx 49801 21136  0.5  0.0 oracletb
     610420      - A    209:55    6  4844 25980    xx 49801 21136  0.5  0.0 oracletb
     630988      - A    145:18    9  4860 25932    xx 49801 21136  0.4  0.0 oracletb
     639154      - A    199:59   10  4828 25900    xx 49801 21136  0.5  0.0 oracletb
     643276      - A    191:42    4  4792 25864    xx 49801 21136  0.5  0.0 oracletb
     651494      - A    193:13    6  4844 25916    xx 49801 21136  0.5  0.0 oracletb
     671756      - A    204:38   10  4776 25848    xx 49801 21136  0.5  0.0 oracletb
     ……

    补丁后$ps gv|grep oracle
        PID    TTY STAT  TIME PGIN  SIZE   RSS   LIM  TSIZ   TRS %CPU %MEM COMMAND
     639170      - A     0:01    3  3036 77100    xx 50917 74064  0.1  0.0 oracletb
     643300      - A     0:00    0  3012 77076    xx 50917 74064  0.0  0.0 oracletb
     651514      - A     0:03    1  3196 77196    xx 50917 74064  0.1  0.0 oracletb
     671762      - A     0:05    2  3120 77184    xx 50917 74064  0.2  0.0 oracletb
     675850      - A     0:04    0  3120 77120    xx 50917 74064  0.2  0.0 oracletb
     680040      - A     0:06    0  3120 77184    xx 50917 74064  0.2  0.0 oracletb
     688218      - A     0:05    0  3116 77180    xx 50917 74064  0.2  0.0 oracletb
     700614      - A     0:09    2  3120 77120    xx 50917 74064  0.2  0.0 oracletb
     ……
00:49 bird » Photos from dbanotes
00:40 image001 » Photos from dbanotes
00:24 Apple Care » Chanel [K]
00:01 红鼎的新标志文本之外 » Fenng's shared items in Google Reader
00:01 张之洞的尸骨找到了(转贴)阮一峰的网络日志 » Fenng's shared items in Google Reader
00:01 小时候的好吃的!(雪糕篇)彩虹 » Fenng's shared items in Google Reader

2007-06-21 Thu