123
 123

2007-10-12 Fri

12:54 Scalar Subqueries (326 Bytes) » Oracle Scratchpad
Here’s a question that recently appeared on the Oracle-L listserver. For the plan, the cost of the parent should be equal or larger than the child. But in the following plan, the total cost (Id=0) is 2, but it’s child “HASH UNIQUE “(ID=1) has a cost of 2083 which is much larger than 2, how could [...]
12:42 Critical Patch Update October 2007 Pre-Release Analysis (4909 Bytes) » Oracle Security Blog
Here is a brief analysis of the pre-release announcement for the upcoming October 2007 Oracle Critical Patch Update (CPU) -

  • Overall, 51 security vulnerabilities are fixed in this CPU, which is lower than average but in the range of previous CPUs (Jul-07=45, Apr-07=36, Jan-07=51, Oct-06=101, Jul-06=62, Apr-06=34, Jan-06=80).
  • The product and vulnerability mix is similar to previous CPUs.  All CPU supported Oracle Database, Oracle Application Server, and Oracle E-Business Suite versions are included.  There are no new vulnerabilities in Oracle Collaboration Suite.  The list of supported versions is getting very short and should be carefully reviewed to determine if version upgrades are required prior to applying the CPU security patches -
        • Database = 9.2.0.8, 10.1.0.5, 10.2.0.2, and 10.2.0.3
        • Application Server = 9.0.4.3, 10.1.2, and 10.1.3
        • E-Business Suite = 11.5.8, 11.5.9, 11.5.10.x, and 12.0.x
  • Oracle instituted a new policy with the July 2007 CPU in that platforms with few downloads of CPU patches will not have patches proactively developed. The CPU patches will only be available upon request.  Fortunately according to the July 2007 CPU note (Metalink Note ID 432873.1), all supported platform/version combinations will have patches proactively released for the October 2007 CPU.  The database note for the October 2007 CPU will have a section titled "Planned Patches for Next CPU Release" that should be carefully reviewed to determine if your platform/version will be an "On Request" patch in the next release.
  • This is the first CPU using version 2.0 of the CVSS metric.  CVSS 2.0 scores seem to be more consistent, but still grossly understate the severity of many database and application vulnerabilities.  Even a vulnerability may allow a complete compromise of the database, the score is less than 7.

Oracle Database
  • There are 5 remotely exploitable without authentication vulnerabilities, which are not typical of previous database vulnerabilities.  Most previous database vulnerabilities require database authentication to exploit.  Depending on the exact nature of the 5 remotely exploitable without authentication vulnerabilities, this quarter's CPU could prove to be the most critical in the past 2 years.
  • At least one of the database security vulnerabilities has a CVSS 2.0 metric of 6.5, which for database vulnerabilities should be considered high risk.
  • The major version support change for this quarter is that 9.2.0.7 is no longer supported.

Oracle Application Server
  • 7 of the 11 vulnerabilities are remotely exploitable without authentication.  A number of these vulnerabilities are probably related to recently fixed Apache which is the base of the Oracle HTTP Server.  Organizations with Internet facing Application Server deployments will most likely want to prioritize this quarter's CPU patches as Oracle HTTP Server, Oracle Single Sign-on, and Oracle Portal are all affected.
  • There are no major changes to the support Oracle Application Server versions for this quarter.

Oracle E-Business Suite 11i and R12
  • Only 1 of the 8 vulnerabilities in the Oracle E-Business Suite is remotely exploitable without authentication. 
  • All supported versions are included (11.5.8 to 11.5.10 CU2 and 12.0.0 to 12.0.3).  This will be the last CPU for 11.5.8.

Planning Impact
  • As with all previous CPUs, this quarter's security patches should be deemed critical and you should adhere to the established procedures and timing used for previous CPUs.

Note: The pre-release announcement is removed when the CPU is released.
12:30 SQL Joins as Seen on a Diagram (2340 Bytes) » Eddie Awad's Blog

Jeff Atwood, the author of the Coding Horror blog, has a nice visual explanation of SQL joins. For the non-visual explanation, I refer you to the following articles:

However, ANSI SQL join syntax does not always work in Oracle, at least up to version 10gR2.

12:18 Managing Slave Lag with MySQL Replication (7159 Bytes) » MySQL Performance Blog

The question I often get is how far MySQL may fall behind and how to keep replication from lagging.

The lag you will see will vary a lot from application to the application and from load to load. Plus what is the most important within same application the lag will likely have spikes - most of applications would have typical lag within few milliseconds while there will be rare cases when replication lags behind several seconds or even longer.

There are multiple reasons why application falls behind and why we see those lag spikes:

Slave Server Load - MySQL Replication goes in single thread so it is really vulnerable to the server load. If you get 100 active queries running on the slave overloading it, slave thread will most likely will not get CPU or Disk resources it needs in order to keep going. So if you want to keep replication lag under control you need to keep Slave load under control and avoid load spikes as load spikes will frequently cause replication lag spikes as well.

Locks - MySQL Replication SQL Thread executes queries same as any other thread and it has to grab the locks needed for query execution - either row level locks for Innodb or table locks for MyISAM and any DDL statements. If you happen to have queries which set a lot of locks on the Slave expect lag spike. For example MyISAM slaves used for long reporting queries can have queries running for hours which stalls replication progress for this time. As MySQL Replication goes in single thread it is enough for one statement to get stuck to have all replication stalled.

Long Queries - MySQL Replication executes queries one after another on the slave, so if you have query which takes certain time on the master you should expect Slave lag spike for at least this amount of time (assuming it takes the same time Master and Slave to run the query). If you have a query which runs 1 minute on the Master it will likely run 1 Minute on the slave stalling all newer updates propagation for the time it runs.

This one is actually the most fun to deal with as there are many techniques and workarounds. First you normally start with query chopping making sure all your update queries are short. If you need to update 1.000.000 rows you do not do it in the same query but get 1000 small and short queries instead.

This however does not work when you need to ALTER TABLE, though running it on Master is frequently not an option either. So this query is often run directly on the Slave(s) when master switched to one of them (especially easy with Master-Master setup) and when query repeated on the second one. Doing this on Master-Master setup do not forget to disable binary logging with SET SQL_BIN_LOG=0 before you run ALTER TABLE query.

Replication Overload Many tutorials out where will give you impression problem with replication starts only when write load is high enough so Master is almost fully busy handling the writes. This is not the case - because MySQL Replication runs in single thread (two threads, but only one of them executes the query) it is not able to use the CPU or the Disks on the slaves as efficient on the Master and the more powerful the Master is the smaller portion of full write capacity you will be able to pass through the replication. If you happen to have IO bound load and have 20 hard drives on the master you may be able to replicate only 10% of the master capacity to the slave.

So watch your replication and see if it getting overloaded. Typically you will see it as increased lag spikes as well as lag which increases and stays high for significant amount of time.

Idea: MySQL Should add “Replication Load Average” metric which would tell what time replication thread was busy processing events compared to being idle. This would help a lot to see when you’re close to the limit.

To manage replication lag and to understand what is loading your replication it is also helpful to examine execution time of queries being replicated. Unfortunately MySQL Slow Query Log does not log replication queries. Though this is one of few slow query logging improvements you can get with our Slow Query Log patch.

You may also interested to know how to measure replication lag - MySQL Toolkit has a great tool for real latency measurement. Do not trust Seconds_Behind_Master too much, even though it is close to the true most of the time there are number of cases when it will be way off from reality.

And the final advice - do not assume very short lag time when planning your application. Having application which can adapt to lag time rather than break is very good idea. Especially it will be handy when you will be reaching replication capacity and will need to buy time to fix things, during which replication lag can be higher than normally.


Entry posted by peter | No comment

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

10:38 How to touch-up portraits with GIMP (12509 Bytes) » Red Hat Magazine

This tutorial explores a few simple techniques to improve a portrait using GIMP. In particular, you’ll see a couple of new features introduced in the new GIMP 2.4, the Healing Tool and the Red Eye Removal filter.

We will start with the boring image on the left and get to the shining one on the right. Note that all images in this tutorial are available in a Flickr set.

Crop to the most interesting part of the photo

Don’t be afraid to cut the photo down to the most interesting part. Use the Crop tool to select the part of the photo which is meaningful for the viewer, in this case, her face. Here I activated guides for the Crop Tool using the rule of thirds to help me with the selection. (See the toolbox for activating these guides.)

Note: The rule of thirds is a guideline used in the composition of images, including in painting and photography. Dividing an image in thirds both horizontally and vertically will create four points of intersection that can be used to align the image to create more tension, energy, and interest.

Remove red eye

If the subject has red eyes, use the Red Eye Removal filter (Filters > Enhance > Red Eye Removal). Zoom in and adjust the slider as needed.

The best option is to not need the red eye removal tool at all. The red eye effect is created by the reflection of the camera’s flash light in the inner part of the eyes. Avoid using the flash when you can, or use your camera’s portrait mode, which will minimize the red eye effect.

Adjust the levels

Improve the dynamic range of the photo using the Levels dialog (Colors > Levels). If you know how to use the tool, move the black and the white sliders for Input Levels to cover the histogram values and the middle sliders to the left or right if you want to enhance the white or black. If you are not familiar with histograms, the Auto button is your friend. It will automatically adjust the levels to what GIMP thinks they should be. This can, however, be wrong, so it’s a good idea to play with the sliders to get a feel for adjusting them yourself.

Roll over the palette to see the results of the adjustment.

Adjust the color curves

You can enhance the photo further by adjusting the Color Curves ( Colors > Curves). For a natural image, an “S” curve will do wonders. Of course, you can do a lot more with this tool, such as adjust brightness and darkness, or use it to adjust each color channel (red, green or blue).


Roll over the palette to see the results of the adjustment.

Remove imperfections with the healing tool

Next, correct large skin imperfections (wrinkles, blemishes, pimples) with the Healing Tool. It works similarly to the Clone Tool by defining a source and a destination area, but it will average the values for a smooth result. Zoom in and choose a brush size as needed.

Note: It’s useful to change the source area (by clicking while holding Ctrl) frequently, to have the source as similar as possible with the destination.

rollover3 Image Roll over a small image to enlarge it.


Choose the healing tool.


After using the tool.


Results of healing.

Enhance detail

To enhance the photo details, use the Unsharp Mask filter (Filters > Enhance > Unsharp Mask). Use small values.


Roll over the palette to see the results of the adjustment.

Adjust color balance

The face in this picture is a little too red, so I used the Color Balance dialog ( Colors > Color Balance) to reduce the redness a bit. As the opposite of red is cyan, the photo turned somewhat blue, so I then reduced the blue a bit.

Whiten teeth and eyes

To whiten teeth or the whites of eyes, use the Free Select Tool (lasso) with Feather edges (a value of 5 is enough) so you don’t need very precise margins, and select the area to whiten. Then Desaturate (Layer > Colors > Hue-Saturation) them a bit.

Rollover Image Roll over a small image to enlarge it.

teeth
Select the area with the lasso.

hue and saturation
Desaturate the area.

teeth 2
Results of desaturation.

teeth 2
Results on full image

Smooth skin

The next step is to make the skin smoother, but be warned, this is a dangerous tool. Abusing it may destroy your photo. Turn on the Quick Mask (Select > Toggle Quick Mask), and with a black foreground and white background, use the Eraser to remove the red mask covering the skin, while avoiding the mouth, hair, eyes, and eyebrows. If you delete too much, reapply that part of the mask using a brush. When you’re ready, turn off the Quick Mask, and you’ll see the skin selected. Use the Selective Gaussian Blur (Filters > Blur > Selective Gaussian Blur) with small values to smooth the skin.

rollover2 Image Roll over a small image to enlarge it.


Use the eraser.


After erasing skin.


Results of erasing with area selected.


Add Gaussian blur.


Results of Gaussian blur.

Note: If you use large values for the Selective Gaussian Blur, you may get an artificial “plastic” effect. If the photo is very noisy, try a Selective Gaussian Blur over the entire photo, but be careful not to destroy the small details and get an even worse “plastic” result.

Add some glow

One last step: add some glow to the photo. Duplicate the layer (Layer > Duplicate Layer) and apply some Gaussian Blur (Filters > Blur > Gaussian Blur) to the duplicate. Also on the duplicate layer, adjust the Color Curves (Colors > Curves) and make the image very bright. Then set the Layer Mode to Soft Light. (Also try other modes for different effects). You can see in this example how the effect can make the photo very bright. When the result is too strong like this, reduce the opacity of the upper layer to tone it down a bit.

rollover4 Image Roll over a small image to enlarge it.


Add gaussian blur.


Adjust the curves.


Results of blur.


Set layer to “Soft light.”


Final results.

Remember what we started with and see what we got as end result. The differences are quite amazing.

It’s not hard to enhance a photo, and you should do it with all those photos you care about. A few small steps can make a difference, and GIMP has all the tools you need for the job. But be careful not to abuse them and get something worse. Remember that you don’t have to use every step in this tutorial for every picture. You may choose to use only one, or nearly all, dependent on your photo.

10:00 Oracle 技术杂志电子版 (2897 Bytes) » DBA notes

©作者:Fenng 发布在 dbanotes.net

OracleMag_cover.gif

Oracle 正式出版的技术杂志还是值得一看的。这个杂志现在也有了电子版的了,我连续收到两期了,制作得很精致。一样是PDF ,你说人家做的咋这么好呢?

这一期的杂志地址: 点击观看或者下载 PDF 版本的。

--EOF--

相关文章|Related Articles

评论数量(0)|Add Comments

本文网址:

09:33 Log Buffer #66: a Carnival of the Vanities for DBAs (320 Bytes) » Pythian Group Blog » Log Buffer
Welcome to the 66th edition of Log Buffer, the weekly review of database blogs, raking up the blogs like so many fallen leaves. Fall back, spring ahead… Remember all the fuss last spring about the change in Daylight Saving Time? Well, it’s back, at least if you neglected it the first time. Thanks to [...]
08:24 Gmail's Storage Increases, 6 GB in January 2008 (2701 Bytes) » Fenng's shared items in Google Reader

Gmail will increase the free storage gradually in the next days. On October 23, you'll get 4321 MB of storage, then the growth will slow down until January 4, when you'll have 6283 MB of storage. From January 4, you'll receive 3.3 MB every day, that's 10 times bigger than the current rate of growth.

Another good news is that Google Apps mail accounts will have the same quota as standard Gmail accounts, while Google Apps Premier Edition will have 25 GB mail accounts. Previously, Google Apps accounts had 2 GB of storage, while the business edition offered 10 GB per account.

Gmail didn't abandon the paid storage option, but you'll get around 50% more storage for the same price: 10 GB for $20/year, 40 GB for $75/year, 150 GB for $250/year and 400 GB for $500/year. The paid storage will probably become more attractive when Google adds more services, like Google Docs, JotSpot or GDrive.

"In April 2005, we started increasing Gmail storage as part of our "Infinity+1" storage plan. At that time, we realized we'd never reach infinity, but we promised to keep giving Gmail users more space as we were able," explains the Gmail Blog. Meanwhile, Yahoo and Microsoft also increased the storage (Yahoo even claims to offer "infinite" storage) and Gmail became the top webmail service with the least amount of free storage.
07:18 比特海日志19月10日,穷疯了 (3183 Bytes) » Fenng's shared items in Google Reader

这个社会上堆满了钱,怎么拿,看个人的手段。比如城管想吃羊肉串了,那就执勤一次,烧的还是公家的油。但是电影《铁三角》这种明目张胆,明火执仗的截道行为,生平仅见。我有盗版碟上千,但是所有国产片全部正版,贼也有操守。《铁三角》对得起我的正版碟和正版人民币么?徐克、林岭东、杜琪峰三大香港导演联手,合拍一部电影,出来的是什么破烂玩意儿?

从开头以为是伦理,到中间以为是灵异片,再到最后以为是警匪,结果什么都不是,什么都没有说清楚。五个颠三倒四的人,一本七拼八凑的片子。按说97回归以后,香港黑社会都去了加拿大,刘德华、成龙都不再受威逼而拍烂片,怎么还会有《铁三角》这种超级烂片出来?有枪战,有床戏,有夜盗,但是究竟这片子想说什么?是找老婆不要找精神病患?还是穷极了也不要爆窃立法院?或者是心魔总是以种种面目引诱世人?

演员其实都不错,但是被三大导用下来以后,全无任何神采。古天乐依然是喜剧片中的小孬造型,在片中不知所谓。任达华如果没有那块手帕,估计连位置感都找不到。林家栋自始至终让人觉得他才是最大变态,但是始终没有亮出电锯。林熙蕾一如寄往充当她的三级花瓶,继续着她泳装激情吹箫妹这份有前途的职业。最惨的是孙红雷,全不见以往在国产电视剧里土流氓的霸气,变成一个2007版的山瑞,喜欢无端发笑,但是笑得又没有任何理由和深度。

几位导演合拍一部电影,在国外是极风雅之事。《铁三角》最让人心酸的也就在这里,洋人是相互默契合作,而三个香港导演是把电影当成了斗地主,或者是缺角麻将。怎么绝了下家的生路怎么来,怎么拆台怎么拍。前一秒钟林熙蕾能被高速行驶的汽车撞到口吐鲜血,奄奄一息,后一秒钟又神气活现地穿上金兜肚跳国标。是鬼片吧?其实他们在影片一开始都死了,后面的全是鬼戏吧?《汉乐府》算是倒了八辈子的血霉了,在这个破片里“山无陵”N次,显得特别有文化的样子,也就把这部片子的无厘头和不靠谱推向了爆笑喜剧的边缘。莫非周星驰要退休了,三位导演要接棒?

徐克、林岭东、杜琪峰如果是缺钱,媒体上说一声,无数大陆粉丝肯定会捐款的。但是拍出这种片子来骗钱骗时间,就让人觉得困惑了。他们任何一个人的影片都在大陆拥有相当多的忠实观众,总有人捧场。为什么要搞这种三人同床异梦的所谓“合作”,用这种垃圾片子来敷衍观众?我想来想去,觉得只有一个解释:在香港房地产恢复景气,H股大幅攀升的今天,他们三个去澳门赌博输到倾家荡产,已经穷疯了。

06:58 黄龙风光 (1817 Bytes) » Fenng's shared items in Google Reader
 
去黄龙的路上,岷山山脉附近…
IMG_8299
 
黄龙,是因下图这条水得名,并不是因为水有颜色,而是水下的地表钙化岩石。
 
IMG_8331
 
五彩缤纷的黄龙河道
 
IMG_8359
 
中下游的水域
 
IMG_8482
 
IMG_8533 IMG_8494
05:01 MyISAM Scalability and Innodb, Falcon Benchmarks (23461 Bytes) » MySQL Performance Blog

We many times wrote about InnoDB scalability problems, this time We are faced with one for MyISAM tables. We saw that several times in synthetic benchmarks but never in production, that's why we did not escalate MyISAM scalability question. This time working on the customer system we figured out that box with 1 CPU Core is able to handle more queries per second than identical box, but with 4 CPU Cores.

The main query which showed this problem was similar to this:

SQL:
  1. SELECT name FROM t1, t2 WHERE t2.t1_id = t1.id AND t1.stat=1  AND  t2.val = 5 LIMIT 1206,18;
  2. mysql> EXPLAIN  SELECT name FROM t1, t2 WHERE t2.t1_id = t1.id AND t1.stat=1  AND  t2.val = 5 LIMIT 1206,18\G
  3. *************************** 1. row ***************************
  4.            id: 1
  5.   select_type: SIMPLE
  6.         TABLE: t2
  7.          type: ref
  8. possible_keys: val
  9.           KEY: val
  10.       key_len: 4
  11.           ref: const
  12.          rows: 4092
  13.         Extra:
  14. *************************** 2. row ***************************
  15.            id: 1
  16.   select_type: SIMPLE
  17.         TABLE: t1
  18.          type: eq_ref
  19. possible_keys: PRIMARY,id
  20.           KEY: PRIMARY
  21.       key_len: 4
  22.           ref: scale.t2.t1_id
  23.          rows: 1
  24.         Extra: USING WHERE
  25. 2 rows IN SET (0.00 sec)
  26.  
  27. WHERE
  28. CREATE TABLE `t1` (
  29.   `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  30.   `stat` int(11) UNSIGNED NOT NULL,
  31.   PRIMARY KEY  (`id`),
  32.   KEY `id` (`id`,`stat`)
  33. ) ENGINE=MyISAM;
  34.  
  35. CREATE TABLE `t2` (
  36.   `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  37.   `val` int(11) UNSIGNED NOT NULL,
  38.   `name` varchar(100) NOT NULL,
  39.   `t1_id` int(10) UNSIGNED NOT NULL,
  40.   PRIMARY KEY  (`id`),
  41.   KEY `val` (`val`)
  42. ) ENGINE=MyISAM AUTO_INCREMENT=4097

Table t1 contains about 260,000 records, all with stat=1, and t2 contains 4000 records, all with val=5 and different t1_id. It is surely not smart index structure for such data distribution but good enough for performance gotcha illustration purposes.

The benchmark shows following results for MyISAM using MySQL 5.0.45 run on 4 Core System:

Threads queries/sec
1 161
2 107
4 110
8 121
16 138

As you see running 2-4 threads concurrently we get result by 30% worse than with 1 thread, although it's only simple select query which should be executed without exclusive table locking. Even on 16 threads we're getting performance worse than with single query.

The problem in this case is key buffer contention which unlike popular belief not fully fixed by changes done in MySQL 4.1

As Monty explained us in MySQL 4.1 the change to key cache locking was done so disk IO is not done while lock is held, while lock is still held when key block is copied to processing thread local storage on Key Read Request. This lock is per key cache so if you have contention while multiple indexes are used you can create multiple key caches and map those to them. In this case however single index had most of the load.

This is partially proved by oprofile data (case with 4 threads):

samples  %        app name                 symbol name
2312008  31.3752  libpthread-2.3.4.so      pthread_mutex_lock
2235465  30.3364  no-vmlinux               (no symbols)
723200    9.8142  libpthread-2.3.4.so      pthread_mutex_unlock
237062    3.2171  mysqld                   key_cache_read
215254    2.9211  mysqld                   find_key_block

As you see 40% of effective CPU time is spent in pthread_mutex_lock / pthread_mutex_unlock.

We could not get oprofile call tree to work on this box so we can only guess where these mutex lock requests come from.

A second confirmation that key_cache is a problem is benchmark run with disabled key_cache (=0).

Results for MyISAM with key_buffer_size=0

Threads queries/sec
1 128
2 113
4 193
8 196
16 195

The result for 1 thread is decreased and it is expected, but, funny, we have more queries per second for 4, 8, 16 with disabled key_cache.

The results for 2 threads is however quite unexpected. Though we did not have a time to profile it in more details.
Note however even in this case scalability is far from perfect giving only 1.5 times gain with.

The solution we proposed in this case was converting table t1 into InnoDB, and results:

Threads Queries/sec
1 296
2 341
4 544
8 493
16 498

InnoDB both performs much better in this case (not surprisingly as there is a lot of primary key lookups) but its scalability is not perfect giving less than 2x in peak which happens to be at 4 concurrent threads. So there is still work to do in addition to fixes done in later MySQL 5.0 versions.

We also decided to take a time and see may be brand new Falcon (significantly updated in 6.0.2 release) handles this query:

Threads Queries/sec
1 51
2 79
4 116
8 142
16 164

As you can see Falcon perform extremely poorly when single query executed being 1/3rd of MyISAM and 1/6th of Innodb. On other hand it scales quite nicely as number of threads increase.

The interesting thing is it shows best performance at 16 threads, showing 50% gain from 4 threads - which is quite unexpected for CPU bound load on system with 4 Cores.

Here is comparison of MyISAM Innodb and Falcon results in the graphical form:

2007-10-12_145302.png

I've created bug, for MyISAM key cache contention issue and lets see if there are any plans to have it fixed.


Entry posted by Vadim | No comment

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

03:27 细节思考:一个失败的注册页面 (4006 Bytes) » Fenng's shared items in Google Reader
NCP是中国雅虎推出的一个新的平台,NCP是什么东西?可以参考它的帮助文档看一下,这是目前的定义,但我想之后无论是这个产品还是这个概念都会逐步延伸和发展。无论多么伟大的产品都是由一点一点的细节组建起来的,NCP目前的注册流程给我的感觉有非常大的提升余地,第一步是填写站点信息,这个页面我认为是一个失败的注册页面。无论这个产品有多好,无论这个产品的用户定位是什么,目前的注册页面对访问者来说都具有一定的“威慑”作用,下面先上张抓图,然后详细说一下我的看法。

[IMG>http://i191.photobucket.com/albums/z133/cnxjj/ncp.png[/IMG>

这个页面一共有5个项目:姓名、电话、站点标题、自定义域名、站点简介,表单项名称和表单项采用右左的对其方式,最右边的说明左对齐,比较平均和中庸。我对这样的结构虽然也有一点微词但这些都无伤大雅,我觉得失败的主要是右边说明文字的内容。说明文字能够起到很好的引导作用,当然也能够起到破坏作用,我认为5个填写项目的说明文字都存在问题,下面一个一个的表述。

1,请填入您的真实姓名,中文或英文,不超过10位
为什么要求填真实姓名?
能不能填写昵称或是别的?
填写了真实姓名会不会有危险?
为什么不能超过10位?

2,请填入您的座机或手机
为什么要填写电话号码?
填写了以后会不会被骚扰?
填写了手机号会不会被收费?

3,站点标题请不要超过10个字,中文、英文或数字
[color=red>提示:站点标题一旦提交将不可修改,请您谨慎填写[/color>

4,请填写大于6个字英文或数字域名,中间不要加空格或特殊字符
[color=red>提示:自定义域名一旦提交将不可修改,请您谨慎填写[/color>

上面2条用红色文字提示“一旦提交将不可修改”,让我非常紧张

5,请填写不超过200字的站点简介
只能填200字?多了不行?

总的来说有4个问题:
1,害怕
被要求填写真实姓名和电话号码,还不知道怎么回事。

2,限制太多
又是限制字数又是限制内容的,哪里都是限制。

3,紧张
红色字体的“一旦提交将不可修改”引起很强烈的紧张感。

4,前后不一致
10位、10个字、6个字、200字、字符长度必须在7-20之间,这都是什么东西?

我建议的解决办法:
1,如果真的需要访问者填写真实姓名和电话号码的话,那就要告诉访问者我们不会做恶,同时还要告诉访问者为什么需要他输入这些敏感内容。如果不是必须,尽量不要让用访问者填写以上那类敏感信息。

2,限制是一定要的,但不一定全把它写在明面儿上,可以隐藏在操作以及错误提示里面。在姓名里面填写超过10位、在站点标题里面填写超过10个字、在站点简介里面填写超过200字的毕竟是少数。

3,在这一步上访问者对产品应该还不足够熟悉,这一步只是一个开始,如果在这时候就让其做一个以后将不可修改的决定是不明智的。如果能够在适当的时候再做这个决定应该会更好,在做决定的时候给予足够多的信息也不错,或是采用其他方法给予提示,比如myspace.cn的2次弹出确认窗口。

4,这个简单,前后保持一致。
02:24 浪潮之巅第四章 — 计算机工业的生态链(二) (7368 Bytes) » Fenng's shared items in Google Reader
发表者:Google(谷歌)研究员 吴军

1. 摩尔定理(Moore’s Law)

2. 安迪-比尔定理 (Andy and Bill’s Law)

摩尔定理给所有的计算机消费者带来一个希望,如果我今天嫌计算机太贵买不起,那么我等十八个月就可以用一半的价钱来买。要真是这样简单的话,计算机的销售量就上不去了。需要买计算机的人会多等几个月,已经有计算机的人也没有动力更新计算机。其它的 IT 产品也是如此。

事实上,在过去的二十年里,世界上的个人微机销量在持续增长。2004 年,英特尔公司估计,五年内,即到 2009 年,世界上 PC(包括个人机和小型服务器)的销量会增长 60%,远远高于经济的增长。那么,是什么动力促使人们不断地更新自己的硬件呢?IT 界把它总结成安迪-比尔定理,即比尔要拿走安迪所给的(What
Andy gives, Bill takes away)。

安迪是原英特尔公司 CEO 安迪•格鲁夫(Andy Grove),比尔就是微软的创始人比尔•盖茨。在过去的二十年里,英特尔处理器的速度每十八个月翻一番,计算机内存和硬盘的容量以更快的速度在增长。但是,微软的操作系统等应用软件越来越慢,也越做越大。所以,现在的计算机虽然比十年前快了一百倍,运行软件感觉上还是和以前差不多。而且,过去整个视窗操作系统不过十几兆大小,现在要几千兆,应用软件也是如此。虽然新的软件功能比以前的版本强了一些,但是,增加的功能绝对不是和它的大小成比例的。因此,一台十年前的计算机能装多少应用程序,现在的也不过装这么多,虽然硬盘的容量增加了一千倍。更糟糕的是,用户发现,如果不更新计算机,现在很多新的软件就用不了,连上网也是个问题。而十年前买得起的车却照样可以跑。

这种现象,乍一看来是微软在和大家做对。实际上,盖茨本人和其它厂商也不想把操作系统和应用程序搞得这么大。据了解,盖茨本人多次说,他过去搞得 BASIC 只有几十 K,你们(微软工程师们)搞一个.NET 就要几百兆,其中一定可以优化。当然,我们知道微软现在的.NET 比二十年前的 BASIC 功能要强的多,但是否强了一万倍,恐怕没有人这么认为。这说明,现在软件开发人员不再像二十年前那样精打细算了。我们知道,当年的 BASIC 解释器是用汇编语言写成的,精炼得不能再精炼了,否则在早期的 IBM-PC 上根本运行不了。但是,要求软件工程师使用汇编语言编程,工作效率是极低的,而且写出的程序可读性很差,不符合软件工程的要求。今天,由于有了足够的硬件资源,软件工程师做事情更讲究自己的工作效率,程序的规范化和可读性等等。另外,由于人工成本的提高,为了节省软件工程师写程序和调程序的时间,编程的语言越来越好用,同时效率却越来越低。比如,今天的 Java 就比 C++ 效率低得多,C++ 又比二十年前的 C 效率低。因此,即使是同样功能的软件,今天的比昨天的占用硬件资源多是一件在所难免的事。

虽然用户很是烦恼新的软件把硬件提升所带来的好处几乎全部用光,但是在 IT 领域,各个硬件厂商恰恰是靠软件开发商用光自己提供的硬件资源得以生存。举个例子,到去年上半年为止,因为微软新的操作系统 Vista 迟迟不能面市,从英特尔到惠普、戴尔等整机厂商,再到 Marvell 和 Seagate 等外设厂商,全部销售都受到很大的影响,因为用户没有更新计算机的需求。这些公司的股票不同程度地下跌了 20% 到 40%。去年底,微软千呼万唤始出来的 Vista 终于上市了,当然微软自己的业绩和股票马上得到提升,萧条了一年多的英特尔也在今年初扭转的颓势,当然惠普和戴尔也同时得到增长。今年,这三家公司的股票都有大幅度上涨。接下来不出意外的话,该轮到硬盘、内存和其它计算机芯片的厂商开始复苏了。Vista 相比前一个版本 XP,也许多提供了 20% 的功能,但是它的内存使用几乎要翻两番,CPU 使用要翻一番,这样,除非是新机器,否则无法运行 Vista。当然,用户可以选择使用原来的操作系统 XP,但是很快的,微软和其它软件开发商会逐渐减少对 XP 系统的支持,这样就逼着用户更新机器。

我们可以看出,个人电脑工业整个的生态链是这样的:以微软为首的软件开发商吃掉硬件提升带来的全部好处,迫使用户更新机器让惠普和戴尔等公司收益,而这些整机生产厂再向英特尔这样的半导体厂订货购买新的芯片、同时向 Seagat e等外设厂购买新的外设。在这中间,各家的利润先后得到相应的提升,股票也随着增长。各个硬件半导体和外设公司再将利润投入研发,按照摩尔定理制定的速度,提升硬件性能,为微软下一步更新软件、吃掉硬件性能做准备。华尔街的投资者都知道,如果微软的开发速度比预期的慢,软件的业绩不好,那么就一定不能买英特尔等公司的股票了。

对用户来讲,现在买一台能用的计算机和十年前买一台当时能用的计算机,花出去的钱是差不多的,如果不是“中国制造”效应的影响,还会因为通货膨胀略有提高。(这句话是不是应该是这样:如果不是“中国制造”效应的影响,对用户来讲,现在买一台能用的计算机和十年前买一台当时能用的计算机,花出去的钱是差不多的,甚至还会因为通货膨胀略有提高。原来的意思是现在同原来没有什么差别,因为我自己感觉是便宜了。修改后的结果是因为中国制造,现在比原来便宜了。)当然,微软和其它软件开发商在吃掉大部分硬件提升好处的同时,或多或少地会给用户带来一些新东西。

如果说在美国,始于二十年前的信息革命是基于个人电脑和互联网的,那么在亚洲,主流则是手机和移动通信。今天的手机一般都有两个处理器,一个数字信号处理器(DSP)和一个与微机处理器类似的通用处理器(CPU)今天,一个中档手机的计算性能,超过了五年前的个人微机,而且还按着摩尔定理预计的速度在增长。虽然在手机行业,并没有一个类似微软的通用操作系统公司存在,但是手机制造商自己、运营商和增值服务商加在一起起到了微软的作用。它们在提供新的但是越来越消耗资源的服务,使得用户不得不几年更新一次手机。

就这样,安迪-比尔定理把原本属于耐用消费品的电脑、手机等商品变成了消耗性商品,刺激着整个 IT 领域的发展。
00:26 又一次郁闷的SQL问题 (1856 Bytes) » OracleDBA Blog

昨天晚上,应用上线,23点开始干活,前期都十分正常,大概在凌晨3点左右,应用有故障过来.一个sql从应用中执行,运行很慢很慢.

检查那个sql,其实是很简单的一个sql,就是在一个表中(约4kw记录),根据where后的三个条件作一个查询,没有表关联.

在plsql中查看该sql的执行计划,在plsql中,该sql的执行计划正常,cost为6,走的是正确的索引.

检查索引的状况,没有任何不对的地方,而且在10号表以及索引都被分析过.并且该表数据不会出现任何异动,也就是说,数据量没有大的增,删,改.

在sqlplus中explain该sql的执行计划,也正常.

让应用发起该应用,在后台捕获该sql的hash_value,然后根据hash_value到v$sql_plan中去查询sql的真实执行计划.还是正常,因为该执行计划非常之简单,就是走了个索引,cost为6.

如果将该sql中的绑定变量直接写上常量,在plsql或者sqlplus中执行,速度非常好,但是在应用上,就是很慢,应用的后台log看,就是慢在这个select上.

那么,实在没有办法,用dbms_system.set_sql_trace_in_session跟踪该sql到底在作什么,奇怪的问题,就出现了,只要我打开trace,sql执行就很快,trace文件中,没有什么异常,只要我关闭trace,sql立刻执行缓慢.

并且,我有两个一模一样的环境,一个在aix 5.3上,一个在hpux11.11上.两个机器上的表现完全相同.

实在没有办法了,将表重新分析一次,取样5%.aix上的正常了,hp上的不正常,还是慢,并且在等待全表扫描和读取临时表空间.在分析一次hp上的该表.系统正常.

实在想不明白为什么会这样,没道理的事情呀.

谁见过这种情况,还是我被oracle忽悠了下.

 

00:15 IBM's Linux contributions (879 Bytes) » Fenng's shared items in Google Reader
When Joe Barr got his first look inside IBM's Linux Technology Center (LTC) back in early 2001 he got pretty gung ho about the wonders this would bring to Linux. Some excerpts: I began to see the LTC not just as a cool thing happening in my neighborhood, but as hard evidence of IBM's commitment to open source and free software in general, and to Linux in particular. This is not hype. This is not an ad on national TV proclaiming that Microsoft software "plays well with others." This is IBM the behemoth, the legacy megacorporation, the king of punched cards, and once the monarch of monopolies, making a positive contribution to the open source and free software community....

2007-10-11 Thu

22:46 搜索的另类体验 » Fenng's shared items in Google Reader
20:36 其实,我们都误解百度了 » Fenng's shared items in Google Reader
09:45 三言二拍:上市,上市 » Fenng's shared items in Google Reader
07:31 结束假期 回到北京 » Oracle Life
05:30 国庆出游 » DBA notes
05:00 Baidu plans R&D centers in Shanghai, Tokyo » Fenng's shared items in Google Reader
04:43 Cost saving in wrong place » DBA Tools
04:30 逻辑卷管理 » developerWorks : AIX 专区的文章,教程
02:33 Y! Blog Downgraded » Fenng's shared items in Google Reader
02:14 badge_image » Photos from dbanotes

2007-10-10 Wed

22:53 嫁给有钱人的秘方 » DBA is thinking
22:00 备份工具rsync介绍 » Welcome to brotherxiao's Home
20:30 小窍门–sqlplus中使用backspace键 » Welcome to brotherxiao's Home
20:30 从 Windows 移植到 UNIX,第 1 部分: 移植 C/C++ 源代码 » developerWorks : AIX 专区的文章,教程
17:22 一夜无眠 » OracleDBA Blog
15:57 Simplifying Database Administration – Part 1 » Fenng's shared items in Google Reader
11:21 多才多艺土摩托 » Fenng's shared items in Google Reader
11:08 无题 » eagle's home
10:37 Friendster_Arch » Photos from dbanotes
09:24 上海F1 » 给你点color see see
08:21 小店2.0:格仔铺 » Fenng's shared items in Google Reader
08:16 如何让sql plus有记忆? » DBA is thinking
06:01 Just for fun... » The Tom Kyte Blog
06:01 Amazon 的 Dynamo 架构 » DBA notes
04:31 方军:朱伟 on 采访 » Fenng's shared items in Google Reader
04:23 尘埃落定 » 人生就是如此