12:16 草根传播活动:粉红十月 · 关注乳癌 » 大学小容>善用网络,助益成长!

特别提醒:如果你使用RSS阅读器订阅小容的这个blog,那么,现在请移步到http://oliver.swordi.com,来看看刚刚更换的顶部主题图片。

上个月,当看到Mashable报道人们通过Twitter参与“九月战役”(September campaign)的时候,小容异常激动。

Scott Harrison,创立了上善若水公益活动(Charity:Water),旨在为埃塞俄比亚的缺水问题募集善款。他的生日在9月份,偶然之间的灵感,他想起用9月生日的名义来发起一轮募资活动。所以,九月战役诞生了,许多九月生日的朋友参与该项活动,在九月战役的网站上建立个人页面,以生日的名义,号召自己的亲朋好友,参与上善若水公益捐赠。

Mashable在Twitter上粉丝捐赠了3536美金,Paul Young通过他的Twitter和Facebook帐号筹集了637美金,Sarah Townsend筹集了400美金。



The September Campaign Trailer - www.borninseptember.org from charity: water on Vimeo.

社会化网络工具可以帮助人们联系的更紧密,也提供了让人们参与社会活动的便利途径。只要巧妙地设计和规划主题,将社会活动和每个人关联起来,赋予每个人日常生活的平常事物以特别的意义,那么草根传播将会快速扩散开来。

小容有些遗憾,因为自己的生日在11月,所以错过了这个有趣的活动。

这一周,小容又在网络上发现了一个有趣的活动:粉红十月(Pink for October),在十月,将你的个人网站改成粉红色调,提醒身边的亲朋好友十月是国际乳癌关注月!

2008年10月17日,小容在中文网络上搜索“粉红十月”这个关键字,发现搜索结果中很少关于“粉红十月”(Pink for October)活动的网页。

2008 年的10月还剩下十三天,小容不想再次错过又一个有趣的活动了。小容已经将自己的blog的顶部图片更换成粉红十月的相关图片,并且提交到了“粉红十月 ”(Pink for October)的网站,小容的blog是2008年度全球第815个参与该项目的网站。在2006年度,全球约有1500个网站参与该项活动,2007 年,这个数字是3000。

那么,今年,这个数字会是多少呢?会有多少个中文网站参与呢?!

现在不要预测答案,开始行动吧,你的一举一动都会影响者这个数字的变化,你的一言一行,有可能影响你身边至亲女性的健康。

下面是小容为这个活动设计的两个宣传图片,你可以选用放在你的blog里,一起参与这个草根传播活动。

A.

B.

11:02 走近 AdSense 中文小组 » Inside AdSense-中文




AdSense 中文小组全体成员出品:)
01:49 JOIN Performance & Charsets » MySQL Performance Blog

We have written before about the importance of using numeric types as keys, but maybe you've inherited a schema that you can't change or have chosen string types as keys for a specific reason. Either way, the character sets used on joined columns can have a significant impact on the performance of your queries.

Take the following example, using the InnoDB storage engine:

SQL:
  1. CREATE TABLE `t1` (
  2. `char_id` char(6) NOT NULL,
  3. `v` varchar(128) NOT NULL,
  4. PRIMARY KEY (`char_id`)
  5. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  6.  
  7. CREATE TABLE `t2` (
  8. `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  9. `char_id` char(6) NOT NULL,
  10. `v` varchar(128) NOT NULL,
  11. PRIMARY KEY (`id`),
  12. KEY (`char_id`)
  13. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

t1 has been populated with 100,000 records, while t2 has 400,000. The data set fit easily in memory.

SQL:
  1. mysql> EXPLAIN EXTENDED SELECT SQL_NO_CACHE COUNT(t1.char_id)
  2.      >  FROM t1
  3.      >  JOIN t2 USING (char_id)\G
  4. *************************** 1. row ***************************
  5.            id: 1
  6.   select_type: SIMPLE
  7.         TABLE: t2
  8.          type: INDEX
  9. possible_keys: NULL
  10.           KEY: char_id
  11.       key_len: 6
  12.           ref: NULL
  13.          rows: 394424
  14.         Extra: USING INDEX
  15. *************************** 2. row ***************************
  16.            id: 1
  17.   select_type: SIMPLE
  18.         TABLE: t1
  19.          type: eq_ref
  20. possible_keys: PRIMARY
  21.           KEY: PRIMARY
  22.       key_len: 18
  23.           ref: func
  24.          rows: 1
  25.         Extra: USING WHERE; USING INDEX
  26. 2 rows IN SET, 1 warning (0.00 sec)
  27.  
  28. mysql> SHOW WARNINGS\G
  29. *************************** 1. row ***************************
  30.   Level: Note
  31.    Code: 1003
  32. Message: SELECT sql_no_cache count(`test`.`t1`.`char_id`) AS `COUNT(t1.char_id)` FROM `test`.`t1` JOIN `test`.`t2` WHERE (`test`.`t1`.`char_id` = convert(`test`.`t2`.`char_id` USING utf8))
  33. 1 row IN SET (0.00 sec)

Notice the differences in key_len and the explicit call to CONVERT() in the WHERE clause. This is a result of the joined columns being of different character sets.

The above query took an average of 4.33 seconds to execute with t1 as utf8 and t2 as latin1. Converting both tables to utf8 resulted in an average execution time of 3.12 seconds and had the following EXPLAIN:

SQL:
  1. *************************** 1. row ***************************
  2.            id: 1
  3.   select_type: SIMPLE
  4.         TABLE: t1
  5.          type: INDEX
  6. possible_keys: PRIMARY
  7.           KEY: PRIMARY
  8.       key_len: 18
  9.           ref: NULL
  10.          rows: 99414
  11.         Extra: USING INDEX
  12. *************************** 2. row ***************************
  13.            id: 1
  14.   select_type: SIMPLE
  15.         TABLE: t2
  16.          type: ref
  17. possible_keys: char_id
  18.           KEY: char_id
  19.       key_len: 18
  20.           ref: test.t1.char_id
  21.          rows: 1
  22.         Extra: USING INDEX
  23. 2 rows IN SET, 1 warning (0.00 sec)
  24.  
  25. mysql> SHOW WARNINGS\G
  26. *************************** 1. row ***************************
  27.   Level: Note
  28.    Code: 1003
  29. Message: SELECT sql_no_cache count(`test`.`t1`.`char_id`) AS `COUNT(t1.char_id)` FROM `test`.`t1` JOIN `test`.`t2` WHERE (`test`.`t2`.`char_id` = `test`.`t1`.`char_id`)
  30. 1 row IN SET (0.00 sec)

Notice here how there is no CONVERT() required and the key_len on both tables match. Just this simple change resulted in more than a 25% improvement in average execution time, from 4.33 to 3.12 seconds.

This test was performed with MySQL 5.0.67, FreeBSD 7, on a box with 2GB RAM.


Entry posted by Ryan Lowe | One comment

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


^==Back Home: www.chedong.com

^==Back Digest Home: www.chedong.com/digest/

<== 2008-10-21
  十月 2008  
    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 29 30 31    
==> 2008-10-23