[MySQL优化案例]系列 -- DISABLE/ENABLE KEYS的作用MySQL 中文网 - » Che, Dong's shared items in Google Reader

有一个表 tbl1 的结构如下:

CREATE TABLE `tbl1` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `name` char(20) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

该表里已经存在了200万条记录.

现在, 需要把 tbl1 中的所有记录全部导到另一个完全相同的表 tbl2 中去.

1. 如果采用以下传统的方式, 则执行时间为: 98.01s

mysql>INSERT INTO tbl2 SELECT * FROM tbl1;
Query OK, 2000000 row affected (1 min 38.01 sec)
Records: 2000000  Duplicates: 0  Warnings: 0

2. 如果是用以下SQL语句, 则执行时间为: 80.85s (36.30 + 44.55)

mysql>ALTER TABLE tbl2 DISABLE KEYS;
Query OK, 0 rows affected (0.00 sec)

mysql>INSERT INTO tbl2 SELECT * FROM tbl1;
Query OK, 2000000 row affected (36.30 sec)
Records: 2000000  Duplicates: 0  Warnings: 0

mysql>ALTER TABLE tbl2 ENABLE KEYS;
Query OK, 0 rows affected (44.55 sec)

从上面的测试结果来看, 在大批量导入时先禁用索引, 在完全导入后, 再开启索引, 一次性完成重建索引的效率会相对高很多, 经过反复几次测试, 感觉后者基本能比前者快 1.2 倍左右. 这也就是 LOAD DATAL INFILE 相对较快的原因之一.

17:31 炝锅面: 我看肖申克 : “First you hate them, then you get used to them. Enough time passes, you get so you depend on them. That’s institutionalized.” » del.icio.us/chedong
Shawshank里面的人。Shawshank里面最多的是以老布(Brooks)为代表的the mass。片中是借Red的口说出他们的特征的,他们被体制化了。是不是和黑客帝国里那些宁愿生活在matrix里的人很像?
15:17 收费英超:一个奠基人的图谋 » It Talks-魏武挥的blog
关于天盛和收费英超,我给二十一世纪经济报道写了一篇东西,但后来做了很大的修改。也许21世纪觉得前一篇更好,我个人倒是以为修改后更佳。所以,我这里给出的是修改后的: 最近,体...
13:18 具有中国特色的“盲道”设计 » Taobao.com UED Team
真的不知道那些盲人们走在这种专门为自己“设计”的路,会有什么感想……… PS:前段时间看到一则来自上海的新闻,上海的地铁因为其在屏蔽门的设计上存在可用性问题,导致发生了乘客被碾死的悲剧。我听过对设计师这样的赞美:设计师时刻改变着生活,改变着世界。但是又不能不说,有的时候,设计师将必须承担着更为重要的责任。 (图片来源:chinaren社区)
12:30 Experience IS the Product...and the only thing users care about » JunChen::Wish Room 1906

JunChen 注:夏天刚开始的时候,Doug 推荐了这篇文章给我,我说翻译一下再发出来。两个月过去了,忙得很,还有很多事情。所以这里就转贴全文了吧,标注了一些重点内容(RSS 读者请打开网页以便于查看高亮)。文章比较长,大意是,不要为了设计产品而设计产品,把传达给用户的体验放在首位。体验就是产品的全部。文中的例子都很不错。

作者:Peter Merholz 原文:http://www.core77.com/reactor/06.07_merholz.asp

Kodak film

"You press the button, we do the rest."

In 1888, an inventor named George Eastman designed, manufactured, and marketed a camera that changed not only photography, but consumer products—forever.Four years earlier, Eastman invented a new kind of film, roll film, that was much easier to handle than fragile photographic plates. Now, had Eastman taken a typical engineering approach to designing a camera that used roll film, he would have copied the typical camera of the time, just on a smaller scale, providing an incremental improvement on his predecessors. Instead, he focused on the experience he wanted to deliver, captured in his advertising slogan, "You press the button, we do the rest."

Transcendent product design is a matter of philosophy and approach. The reason product development has gone wrong is that people stop at the worst time—when the solutions are most convoluted. What Eastman knew, what Jobs knows, is that you have to go beyond; you have to think about the experience people are having.

Thanks to this new film, the new camera's functioning was extremely simple. Unlike earlier cameras, the user never needed to open this camera, and there were only three steps to take a picture: Pull the Cord (to prepare the shutter), Turn the Key (to advance the film), and Press the Button (to release the shutter). After 100 exposures were used, you sent the camera (or just the film roll) into Eastman, waited a while, and had your film professionally developed and printed for you.

This level of accessibility began the consumer revolution in photography, and this camera, the Kodak, became one of the first consumer technology brands. By approaching design with the customer in mind, and not simply as a collection of functional requirements, Eastman arrived at a radically different result.

Take another look at that phrase—"You press the button, we do the rest." Eastman marketed the camera based on this promise of experience. But in order to achieve that result, Eastman couldn't just design a simpler product. That would only address the first half of the phrase.

new Kodak cameras

On its own, a simple camera is meaningless, because the entire photographic process (loading a camera, exposing the light-sensitive material, removing that material, processing the material, printing images from that material) could not get any simpler. Eastman's genius was in designing his system so customers could do what mattered most to them—capturing the image ("You press the button"). Eastman located other functions elsewhere in the system ("We do the rest"), allowing the Kodak camera to be remarkably straightforward to use.

In order to meet his goals for delivering the desired experience, Eastman developed relationships with his customers that ensured they remained satisfied. He couldn't think of Kodak as a product, but as a service. This necessitated a factory unlike any seen before, one that could handle complex processing and printing capabilities. Investing in such an operation was an immense risk, but necessary if Eastman were to deliver on his promise to "Do the rest."

For the customer to continue to use the product, she needed to send it in to get the photos processed and printed, and for the new roll to be loaded. Cameras, which were once standalone products, now became points of entry into a service.

Why can't we learn?

Why is it that what Eastman figured out over 100 years ago seems forgotten today? Why do so few products seem concerned with how they fit into the lives of their customers? (Been to a consumer electronics event recently?) Why is it that people still approach products as isolated entities, unconnected with the world around them?

A comment that sheds light on this comes from Steve Jobs, CEO of Apple:

When you start looking at a problem and it seems really simple, you don't really understand the complexity of the problem. Then you get into the problem, and you see that it's really complicated, and you come up with all these convoluted solutions. That's sort of the middle, and that's where most people stop....

But the really great person will keep on going and find the key, the underlying principle of the problem—and come up with an elegant, really beautiful solution that works.

That's what we wanted to do with Mac. —from Insanely Great, written by Steven Levy

Until the last sentence, you might have thought he was taking about the iPod or even the iPhone. But the quote came from 1984, and demonstrates that transcendent product design is a matter of philosophy and approach. The reason product development has gone wrong is that people stop at the worst time—when the solutions are most convoluted.

What Eastman knew, what Jobs knows, is that you have to go beyond; you have to think about the experience people are having.

Tivo

Technology, Features, Experience

Products, necessarily, begin with the technology that makes them possible. And the introduction of a new technology is all that is needed to establish oneself in the market. When VCRs came on the consumer market in the late 70s, all that really mattered is that it did something you could never do before—record television shows so that you could play them back at a time of your choosing. It didn't matter that it took up a lot of space and didn't look pretty and wasn't particularly easy to use. It's the talking dog syndrome—the dog doesn't talk well, but all that matters is that it talks at all.

Eventually, though, competitors mimic your technology, and features become the important differentiator. You load your offering with more stuff, and it fills the product's packaging with bullet points. In the 1980s and into the 1990s, VCRs began loading up on functionality, things like VCR Plus, on-screen menus, various playback speeds, child locks, jog wheels, 21-day timers, the ability to record one frame at a time, and more. There's a reason the blinking 12:00 became the icon of poorly designed consumer electronics, and most folks used the VCR as simply a VCP—video cassette player, viewing whatever they rented.

At some point, product categories require a quantum evolution—beyond technology and features—to the satisfaction of a customer experience. The VCR begat the DVR, and TiVo, the leading DVR brand, is successful because they began with an experience mindset, and developed the product to suit that.

In some ways, it's unfair to compare TiVo with earlier VCRs, because the underlying technology is fundamentally different. But, like George Eastman did with his roll film, TiVo took a new technology (hard drive-based digital video recording) and didn't simply copy prior models, but applied an experience mindset that lead to a fundamental rethinking of people's relationship to television.

You Need An Experience Strategy

Now, Kodak, Apple, and Tivo are pretty hoary examples of success in product design. But they keep coming up because so few products work so well. And what unites these three are defining visions to orient their efforts toward.

At best, most product organizations have a list of requirements to meet, and, more typically, they simply have a set of features to develop. Designing and developing to requirements and feature lists leads to unsatisfactory experiences, because you're no longer oriented to the perspective of the user. As you make decisions along the way, your concerns for features, data, and technology trumps serving the customer. This is in large part because you have those requirements and feature lists in front of you, but nothing to represent the experiential point of view.

This is where experience strategy comes into play. As my colleague Jesse James Garrett has commented, experience strategy serves as "a star to sail your ship by." An experience strategy is a clearly articulated touchstone that influences all the decisions made about technology, features, and interfaces. Whether in the initial design process, or as the product is being developed, such a strategy guides the team and ensures that the customer's perspective is maintained throughout.

An experience strategy can take many forms. At heart it is a vision, an expression of the experience you hope customers will have. The ur-experience strategy is George Eastman's slogan for Kodak, "You press the button, we do the rest." As a description of the desired experience, it's not particularly soulful or nuanced—nothing poetic about capturing memories. But it oriented Eastman's delivery for an entire photographic system that supported this simple experiential goal.

clearRX

Another option is to embody the experience strategy in some kind of prototype. A recent example, quickly becoming a classic, involves Deborah Adler's Masters Thesis in design school. Looking for a suitable subject, she found out that her grandmother had taken her grandfather's medication by mistake. She realized such mix-ups were too easy; prescription bottles used haphazard typefaces on labels affixed to curved surfaces that were hard to read. At first glance, all bottles from the same pharmacy look the same. Research showed her that 60% of people taking prescriptions have committed such errors.

Her thesis project, named SafeRX, reconceptualized the pharmacy bottle, incorporating modern typefaces, visual hierarchy, color coding, and improved bottle design. Shopping it around after graduation, she found an interested suitor in Target. Working with Klaus Rosburg at Sonic Design, the initial concepts turned into ClearRX.

You've probably heard this story before, but what's rarely stressed is the importance of the vision embedded in her original SafeRX design. It served as an experience strategy—a guiding light for all those developing the systems that would eventually make the bottle work. When changes needed to be made, it was always with an eye to how to maintain the experience. For instance, Adler's initial concept involved color-coding the labels, to distinguish the medication of each family member. When color printing proved too costly, the idea was maintained through colored rings affixed to the bottle's neck.

Flickr

Experience strategies also come in the form of mission statements. Mission statements don't have to be dreadful—it's just that most are. The photo sharing service Flickr arrived in 2004, at a moment of surprising complexity in the world of digital photography. Sales of digital cameras had surpassed film cameras, hard drives were loading up with images, cameraphones were everywhere, some people wanted prints, others just wanted to email, others wanted to start photo blogs.

Flickr emerged as an interface to this complex system, coordinating components that had been built separately, tying them together in its giant database.

Flickr's meteoric rise is now legendary. But, given the potential chaos that surrounds the service, it offers remarkable coherence in its experience. How does it not fracture?

Flickr is driven by explicit experience strategy. Two in fact, written right there on its About Page:

  1. We want to help people make their photos available to the people who matter to them.
  2. We want to enable new ways of organizing photos.

In support of the first goal is this very telling sentence: "To do this, we want to get photos into and out of the system in as many ways as we can: from the web, from mobile devices, from the users' home computers and from whatever software they are using to manage their photos." Flickr understands that you have a collection of tools that you're using, and has no desire to replicate their functionality—it wants to capitalize on their functionality to offer new opportunities for sharing.

Actually, Flickr does want to replicate, or rather, surpass, the functionality of one kind of existing tool—photo management software. Flickr recognized that existing management tools are stuck in outmoded ways of considering pictures—rolls and albums. When faced with hundreds or thousands of photos, new means are necessary. And since no one else was stepping up, they did. Their experience strategy drove new offerings, such as tagging, photo sets, groups, and maps.

Stop Designing Products

When you start with the idea of making a thing, you're artificially limiting what you can deliver. The reason that many of these exemplar's forward-thinking product design succeed is explicitly because they don't design products. Products are realized only as necessary artifacts to address customer needs. What Flickr, Kodak, Apple, and Target all realize is that the experience is the product we deliver, and the only thing that our customers care about.

查看或发表评论

11:34 search query world map » information aesthetics

search_query_world_map.jpg
a world map illustrating the origin & content of the most popular search queries via Google, revealing the preferences & interests of the world population. the map is based on data from the Google Zeitgeist statistics of 30 different countries from April to June 2006.

[link: incom.org]

11:07 future forces affecting education » information aesthetics

knowledgeworks.jpg
a graphical concept map that forecasts a consistent view of how future forces will affect the components of public education in the US. the map was created by aggregating the opinions of relevant experts who create intensive case studies based on field research.

the vertical side shows 6 categories driving all trends, such as "smart networking", "strong opinions" or "the end of cyberspace". the horizontal direction illustrates 5 key areas of activity where major trends are revealed, such as "family", "institutions", or "educators". different rectangular zones depict the dilemmas, trends or hotspots that will impact public education.

[link: kwfdn.org]


^==Back Home: www.chedong.com

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

<== 2007-08-15
  八月 2007  
    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    
==> 2007-08-17