Tip: 看不到本站引用 Flickr 的图片? 下载 Firefox Access Flickr 插件 | AD: 订阅 DBA notes -- ![]()
2008-09-03 Wed
當網站要更改網址, 要搬家的時後, 通常都是在考慮直接放棄, 從新再來. 若要留著, 那就需要做點規劃.(通常是很簡單的規畫, 很辛苦的實作.. XD)
註: 捨棄/留存影響範圍主要是搜尋引擎(索引, index) 和 其它網址連結過來的連結 是否能正常連結到網站來.(若是有提供使用者服務的, 需要另外考慮使用者觀感, 這個在此不列入討論)
Google 黑板報 這篇說明蠻建議參考: 網站遷移的最佳方法 - Google 中國Blog
參考文章中提到的步驟: (以下建議都先搬一部分做測試, 不要一次全搬
)
- 轉換網址時使用 301重導向功能 (301 redirect), 代表 此網址 要 永久搬移 到 新的網址 去.
- tail -f access.log | grep 404 (apache 的 access log, 監看 apache 的 log, 出現 404 error 的頁面網址)
- 將上個步驟抓到的 404 網址, 與新網址做 301 redirect 對應, 對應不到也盡量找相似內容的網址.
- 檢查網頁的內、外部連結, 如果目錄結構有要變動, 內部網址的對應就盡量用 絕對連結(ex: http://example.com/food/foo.html), 而不是採用相對連結(ex: ../food/foo.html).
- 使用 Xenu 是連結的檢查工具, 可以檢查網站是否有死連結.
- 網址的所有權, 至少還要掌握 180天. (不要轉換完, 馬上就把網址廢了, 或許還有很多網址還沒轉完)
- 最後, 持續監控 access.log 抓 404 error 一段時間, 就完成網站搬遷動作.
- 此步驟為非必要: 若有使用 Google webmaster(Google 網站管理工具), 將新網址加進網站管理工具 中, 再去 重新認證網址所有權, 並提交新的 Sitemap.
如果網站因 重新命名/重新設計, 而需要變更網址, 也建議分兩階段
- 搬移網址
- 重新設計 (先搬完再重新設計)
最後個人建議, 如果不需要搬家, 這種勞民傷財的事還是少做為妙. Orz..
There have been some upgrades across the janky cluster that have caused a few issues like 500 errors and site downtime. Because of the volume of support this has created, we thought it would be a wise idea to roll these issues up into a blog post in order to address everything that has been going on. It’s not a perfect solution by any means — especially since this should have been addressed sooner — but I’m hoping that most of the folks on janky can benefit from the solutions I will outline below.
For the customers who have been seeing temporary site outages between the hours of 10pm and 10am PST, you have been witnessing the upgrade happening itself. We’re taking all of the servers on your clusters and giving them the latest and greatest version of Debian. This means that services might error out for a few minutes while new key packages are put into place of old ones. This is also being done in controlled batches in order to minimize outages and incoming support.
Yes, this strategy isn’t optimal. As a company that hosts customers around the world, it is hard to pick a time that won’t inconvenience somebody. As a large percentage of our customer base is in the United States, the times listed above were picked. This also allowed for a minimal amount of disruption. Still, people are seeing problems — and we’re sorry if you’re one of them.
If the outages weren’t enough, there have been 500 errors that have been cropping up. These can be caused by a couple of things:
1. Software (PHP, Python, etc.) that was compiled against the old 32-Bit libraries on our server. Since the new version of Debian (Etch) is 64-Bit, this has caused locally compiled binaries to fail. A quick way to fix this is to recompile any custom software against the new libraries on our server. Unfortunately, since custom software falls under the “unsupported” category, the best we can do is point you at the following DreamHost Status blog post from a few night ago and wish you luck:
http://dreamhoststatus.com/2008/09/02/debian-upgrades-and-custom-php/
Good luck!
2. Recent changes to Apache 2 caused anybody using AuthGroupFile in their .htaccess to get errors. It turns out this was an oversight. The module was recently added to Apache 2 and our servers have been reconfigured — so this should be fixed now. If you continue to see errors tho, you might want to attempt commenting out any AuthGroupFile lines in your site’s .htaccess files (adding a “#” to the beginning of the line should do the trick) and reloading your page. If your site comes up after commenting that line out, please drop me a line so I can fix your Apache service correctly.
Should you find that your problem was not addressed here and you still need assistance, please let us know right away by contacting Technical Support. One of our techs will be glad to assist you with any issues that you might be seeing. We want to make sure that everything is how it should be, after all…
This past winter, Red Hat announced the release of a product called MRG–a computing platform that features high-speed messaging and allows high-throughput computing, realtime transactions, and workload management. Not sure what all that means? We weren’t either. So we contacted Brian Che, the project manager for MRG, to see if we couldn’t get a few questions answered. He obliged, and so we bring you the MRG QandA. Still have questions of your own you want answered? Comment and let us know…
Red Hat has been working on the technologies behind MRG for quite some time–each of the components in MRG has had years of development. For example, Red Hat has been working on realtime technologies in the upstream kernel community for over seven years. Messaging has had a
similarly lengthy development history. Condor, the technology behind our grid scheduler, started development in the 1980’s!
We started work on these technologies because we saw the need for these capabilities, even if we didn’t know when or how we were going to bring
these technologies to market yet. For example, messaging is at the heart of enterprise computing. We had needs for messaging infrastructure at Red Hat–for building out our own capabilities around things like virtualization management. Many of Red Hat’s customers were asking us to provide an open source messaging offering. So, we started working on the AMQP specification and our messaging implementation, even though we didn’t know it was going to end up in something called “Red Hat Enterprise MRG”.
As we started working with customers and the community around the various technologies in MRG, it became apparent to us that the technologies had reached a point of maturity where we could support our most demanding customers with them. Also, we saw significant opportunities for building out fundamentally new capabilities by integrating messaging, realtime, and grid into one platform. And so, MRG was born.
We released MRG v1 at the Red Hat Summit on June 19, 2008. MRG v1 offers support for messaging and realtime, and grid is in Technology Preview. We’ll release a 1.1 update to MRG that will bring grid into full support as well.
JP Morgan Chase, like other investment banks, uses messaging for everything from executing stock trades to providing feeds of market data
to internal data distribution. They currently send over 1 billion AMQP messages per day.
Realtime provides deterministic performance. The US Navy is deploying realtime in its DDG 1000 naval destroyers. Realtime is critical in this
environment, because the ships’ computers have to respond precisely without ever pausing, freezing, or getting out of sync with other
events. Otherwise, the results could be disastrous.
One of our large manufacturing customers has been working with Red Hat to build an on-demand grid in Amazon’s EC2 cloud environment for the times it needs access to a grid for calculations. Because this customer isn’t able to utilize fully a dedicated grid, having the option to deploy a grid in the cloud provides them significant cost savings and flexibility.
There isn’t an ideal customer–ultimately, we think that almost any customer will benefit from MRG. MRG provides a new platform and solution for many of the most pressing problems that enterprises face today. We have significant customer interest from many industries.
Having said that, many of our largest customers are MRG early adopters, such as investment banks like JP Morgan Chase, telco companies like
Alcatel Lucent, and multiple agencies in the US Government. We are also working across oil&gas, animation studios, Internet, shipping, stock exchanges, defense, travel, and so on.
MRG takes special advantage of and is highly optimized for Linux to deliver its performance. Additionally, at Red Hat, we have been driving
changes into Linux itself in order to benefit things like messaging performance. So, the fact that we are focusing on just one platform and optimizing both that platform and our implementation on that platform gives us tremendous gains (Note: everything we do is open source and contributed back to the community).
For example, we have written a new high performance journal for durable or persistent messaging that is highly tailored to Linux’s I/O model.
By using this journal, MRG Messaging can achieve throughputs up to about 500,000 durable messages/second/LUN. This rate is about 100 times
faster than other messaging solutions. For more details, you can read Carl Trieloff’s entry in the Red Hat Press blog.
Yes. For example, we support messaging clients across a wide variety of platforms and languages, from Linux to Solaris to Windows, and from C++ to Java/JMS to scription languages like Python. On the grid side, we’ll support scheduling to both Linux and Windows. And, of course, since we integrate with virtualization, this gives us a lot of flexibility in running on other operating systems.
We definitely see a lot of interest in cloud computing from customers. MRG integrates with cloud providers like Amazon EC2 so that you can dynamically provision and add capacity in the cloud from your grid scheduler. This means, for example, that you could have a scenario where you fully utilize your local data center but have additional work you want to compute.
MRG can automatically provision, say, 1000 extra servers for you at EC2, send your work over, get your results back, and tear down the servers when you’re done–all automatically. Some of our other customers are looking at provisioning most or all of their capacity in the cloud because they won’t utilize a data center fully and want to save on capital expenses.
In either case, one of the powerful features of MRG is that it can blend local capacity with cloud capacity. This means you don’t get locked into one cloud provider, and you can grow your infrastructure dynamically in the cloud or in your local data center.
One of the significant things about AMQP is that it is the first protocol standard for business messaging. All other standards, like JMS, aren’t comprehensive enough and don’t specify down to the wire level to provide true interoperability and an open ecosystem. So, I’m not concerned about competing standards–there aren’t really any right now. That’s why there is so much interest in AMQP.
I think that most big businesses will understand and appreciate what AMQP has to offer. Notably, many of the big businesses driving AMQP are not vendors but users. Eventually, if you want to work with these users, you’re going to have to adopt AMQP.
MRG is important to all of our offerings–it’s pretty strategic and central to many of the things that Red Hat is doing. MRG adds realtime capabilities to Red Hat Enterprise Linux and enables you to provide flexible scalability and performance for applications running on Red Hat Enterprise Linux. We’re working with Red Hat Network so that you can provision and manage MRG with our standard management tools. MRG Realtime and a realtime JVM from IBM or Sun can provide deterministic performance for JBoss Java applications. We’re working with the JBoss team to support MRG Messaging as a messaging transport for the JBoss ESB. And, many of our core products and technologies are using MRG technology. IPA and oVirt, for example, are both leveraging our messaging capabilities for distributing data.
More information
- Read more about MRG at the Red Hat Press blog.
- See the official MRG announcement.
- The official MRG pages on redhat.com.
Following up on my Previous Post I decided to do little test to see how accurate stats we can get for for Index Stats created by ANALYZE TABLE for MyISAM and Innodb.
But before we go into that I wanted to highlight about using ANALYZE TABLE in production as some people seems to be thinking I advice to use it.... a lot. In fact I should say I see more systems which have ANALYZE abused - run too frequently without much need than systems which do not run ANALYZE frequently enough.
First it is worth to note MySQL only saves very basic cardinality information for index prefixes for index stats and these rarely change. There is no histograms or any other skew metrics etc. MySQL optimizer also uses number of rows in the table for many decisions but this is computed live (maintained for MyISAM and estimated during query execution for Innodb). This basic information means it does not change whole that quickly at extent to affect optimizer plans.
If you look at the stats accuracy along running ANALYZE TABLE after initial table population and when there are significant changes makes sense. For Innodb as index stats are computed first time table is accessed after restart this often means "never" because MySQL servers are restarted frequently enough. Even once per 3 months is often enough for many workloads. Add to this Innodb stats are less accurate by nature which means you can allow more data change while your
index stats remain as good as new.
Looking at stats accuracy is however a wrong way to look at the problem. Your index stats are a bit off, so what ? What really matters is not how accurate stats are but how good plans you're getting for your queries. If you're getting as good plans as with perfect stats why bother updating them ?
Also note many simple "queries" (using constants for index accesses) will not use index cardinality data at all but will estimate number of rows during query execution.
I typically look at ANALYZE TABLE and adding it to the table if I see having it run helps to get good plans. If query plans are good or bad independently of it being run there is need to bother - for bad plans use FORCE INDEX or change the query and report MySQL Optimizer Bug
But now lets see in the difference of behavior of ANALYZE TABLE for MyISAM vs Innodb.
I used the following simple table for tests:
-
CREATE TABLE `antest` (
-
`i` int(10) UNSIGNED NOT NULL,
-
`c` char(80) DEFAULT NULL,
-
KEY `i` (`i`),
-
KEY `c` (`c`,`i`)
-
) ENGINE=MyISAM DEFAULT CHARSET=latin1
I have populated it with data with following true cardinality:
-
mysql> SELECT count(DISTINCT c) FROM antest;
-
+-------------------+
-
| count(DISTINCT c) |
-
+-------------------+
-
| 101 |
-
+-------------------+
-
1 row IN SET (0.36 sec)
-
-
mysql> SELECT count(DISTINCT i) FROM antest;
-
+-------------------+
-
| count(DISTINCT i) |
-
+-------------------+
-
| 101 |
-
+-------------------+
-
1 row IN SET (0.20 sec)
-
-
mysql> SELECT count(DISTINCT i,c) FROM antest;
-
+---------------------+
-
| count(DISTINCT i,c) |
-
+---------------------+
-
| 10201 |
-
+---------------------+
-
1 row IN SET (0.43 sec)
Lets see how stats look for MYISAM:
-
mysql> SHOW INDEX FROM antest;
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest | 1 | i | 1 | i | A | NULL | NULL | NULL | | BTREE | |
-
| antest | 1 | c | 1 | c | A | NULL | NULL | NULL | YES | BTREE | |
-
| antest | 1 | c | 2 | i | A | NULL | NULL | NULL | | BTREE | |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
Aha as you can see there is no cardinality stored with table as ANALYZE did not run yet.
-
mysql> SHOW INDEX FROM antest;
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest | 1 | i | 1 | i | A | 101 | NULL | NULL | | BTREE | |
-
| antest | 1 | c | 1 | c | A | 101 | NULL | NULL | YES | BTREE | |
-
| antest | 1 | c | 2 | i | A | 10240 | NULL | NULL | | BTREE | |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.01 sec)
As you can see after running ANALYZE we have exact cardinality for i and c columns, with cardinality for the pair (c,i) looks a bit off but is within 0.5% of the correct value so we can count on MyISAM values as almost exact.
As you see ANALYZE table tool a little bit of time to run (even for this very small table) this is because ANALYZE does index scans to find number of exact values in the table.
Now let us populate antest_innodb table which is same but uses Innodb format:
-
mysql> INSERT INTO antest_innodb SELECT * FROM antest;
-
Query OK, 245760 rows affected (54.29 sec)
-
Records: 245760 Duplicates: 0 Warnings: 0
-
-
mysql> SHOW INDEX FROM antest_innodb;
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest_innodb | 1 | i | 1 | i | A | 245900 | NULL | NULL | | BTREE | |
-
| antest_innodb | 1 | c | 1 | c | A | 245900 | NULL | NULL | YES | BTREE | |
-
| antest_innodb | 1 | c | 2 | i | A | 245900 | NULL | NULL | | BTREE | |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
Very interesting result - after loading the data with INSERT in Innodb table we do not get NULL cardinality as with MyISAM but instead we get very wrong cardinality which shows us index prefix is unique (245900 is estimate for the row count in the table)
It is worth to note if you do ALTER TABLE Innodb, same as MyISAM will internally run analyze as soon as table is rebuilt and values will be more sensible:
-
mysql> ALTER TABLE antest_innodb type=innodb;
-
Query OK, 245760 rows affected, 1 warning (51.87 sec)
-
Records: 245760 Duplicates: 0 Warnings: 0
-
-
mysql> SHOW INDEX FROM antest_innodb;
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest_innodb | 1 | i | 1 | i | A | 332 | NULL | NULL | | BTREE | |
-
| antest_innodb | 1 | c | 1 | c | A | 18 | NULL | NULL | YES | BTREE | |
-
| antest_innodb | 1 | c | 2 | i | A | 20491 | NULL | NULL | | BTREE | |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
Note however how much are these values off from reality. The "i" key cardinality is overestimated 3 times, "c" key prefix cardinality is underestimated 5 times and the combined (c,i) key cardinality is overestimated 2 times. So Innodb stats are are very inexact. Fortunately for most queries which use these stats accuracy at the order of magnitude is enough. Sometimes it is not and you're thinking why a hell it could be picking this strange plan.
Let us run ANALYZE TABLE for Innodb couple of more times to see how values change:
-
mysql> analyze TABLE antest_innodb;
-
+--------------------+---------+----------+----------+
-
| TABLE | Op | Msg_type | Msg_text |
-
+--------------------+---------+----------+----------+
-
| test.antest_innodb | analyze | STATUS | OK |
-
+--------------------+---------+----------+----------+
-
1 row IN SET (0.00 sec)
-
-
mysql> SHOW INDEX FROM antest_innodb;
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest_innodb | 1 | i | 1 | i | A | 338 | NULL | NULL | | BTREE | |
-
| antest_innodb | 1 | c | 1 | c | A | 18 | NULL | NULL | YES | BTREE | |
-
| antest_innodb | 1 | c | 2 | i | A | 20491 | NULL | NULL | | BTREE | |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
-
-
mysql> analyze TABLE antest_innodb;
-
+--------------------+---------+----------+----------+
-
| TABLE | Op | Msg_type | Msg_text |
-
+--------------------+---------+----------+----------+
-
| test.antest_innodb | analyze | STATUS | OK |
-
+--------------------+---------+----------+----------+
-
1 row IN SET (0.00 sec)
-
-
-
mysql> SHOW INDEX FROM antest_innodb;
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest_innodb | 1 | i | 1 | i | A | 92 | NULL | NULL | | BTREE | |
-
| antest_innodb | 1 | c | 1 | c | A | 384 | NULL | NULL | YES | BTREE | |
-
| antest_innodb | 1 | c | 2 | i | A | 20491 | NULL | NULL | | BTREE | |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
As we see subsequent runs change stats dramatically. For c prefix we got value changed to become 15 times larger. So Innodb stats are both inexact and unstable. So restarting server with Innodb may change stats dramatically and affect some query plans. You also may be getting different plans on different slaves with same data.
Another difference when it comes from handling the statistics comes from NULL handling.
MyISAM has a special variable which controls if NULLs should be considered equal when computing stats:
-
mysql> SHOW VARIABLES LIKE "myisam_stats_method";
-
+---------------------+---------------+
-
| Variable_name | Value |
-
+---------------------+---------------+
-
| myisam_stats_method | nulls_unequal |
-
+---------------------+---------------+
-
1 row IN SET (0.00 sec)
Too see the difference let me set column "c" to NULL in both tables and see how values change:
-
mysql> UPDATE antest SET c=NULL;
-
Query OK, 245760 rows affected (11.48 sec)
-
Rows matched: 245760 Changed: 245760 Warnings: 0
-
-
mysql> UPDATE antest_innodb SET c=NULL;
-
Query OK, 245760 rows affected (1 min 20.19 sec)
-
Rows matched: 245760 Changed: 245760 Warnings: 0
-
-
-
mysql> SHOW INDEX FROM antest;
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest | 1 | i | 1 | i | A | 101 | NULL | NULL | | BTREE | |
-
| antest | 1 | c | 1 | c | A | 245760 | NULL | NULL | YES | BTREE | |
-
| antest | 1 | c | 2 | i | A | 245760 | NULL | NULL | | BTREE | |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
-
-
mysql> analyze TABLE antest_innodb;
-
+--------------------+---------+----------+----------+
-
| TABLE | Op | Msg_type | Msg_text |
-
+--------------------+---------+----------+----------+
-
| test.antest_innodb | analyze | STATUS | OK |
-
+--------------------+---------+----------+----------+
-
1 row IN SET (0.01 sec)
-
-
mysql> SHOW INDEX FROM antest_innodb;
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest_innodb | 1 | i | 1 | i | A | 418 | NULL | NULL | | BTREE | |
-
| antest_innodb | 1 | c | 1 | c | A | 8 | NULL | NULL | YES | BTREE | |
-
| antest_innodb | 1 | c | 2 | i | A | 196 | NULL | NULL | | BTREE | |
-
+---------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
As you can see MyISAM set cardinality for prefix (c) and key(c,i) approximately to number of rows in the table treating all nulls different values. Innodb on the contrary treats all NULL values the same so
cardinality for (c) and (c,i) dropped significantly.
This means Innodb and MyISAM have different stats computation method by default.
Lets check how stats change for MyISAM if we change the stats computation method:
-
mysql> SET myisam_stats_method='nulls_equal';
-
Query OK, 0 rows affected (0.00 sec)
-
-
mysql> analyze TABLE antest;
-
+-------------+---------+----------+-----------------------------+
-
| TABLE | Op | Msg_type | Msg_text |
-
+-------------+---------+----------+-----------------------------+
-
| test.antest | analyze | STATUS | TABLE IS already up TO date |
-
+-------------+---------+----------+-----------------------------+
-
1 row IN SET (0.00 sec)
oops. Little gotcha. MySQL considers table up to date even though stats stored were computed with different method. If your table is written to actively you should not have this problem; I just did couple of updates to refresh update time.
-
mysql> SHOW INDEX FROM antest;
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| TABLE | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | NULL | Index_type | Comment |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
| antest | 1 | i | 1 | i | A | 101 | NULL | NULL | | BTREE | |
-
| antest | 1 | c | 1 | c | A | 1 | NULL | NULL | YES | BTREE | |
-
| antest | 1 | c | 2 | i | A | 101 | NULL | NULL | | BTREE | |
-
+--------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
-
3 rows IN SET (0.00 sec)
So with nulls_equal method we see very different picture. It is considered we only have one distinct value for "c" and there are 101 distict values for (c,i) which is the same as value of distinct values in i column. These stats look much closer to what we get for Innodb table with same data though we can see Innodb stats are a bit off from reality too.
MySQL version note: This is from MySQL 5.0.62 if there are other versions which show different behavior.
Entry posted by peter | One comment
Google正式推出了自己的浏览器 - Google Chrome。
按照Google的解释,这是一个全新开发的多进程的浏览器,每个Tab都跑在自己的Structure上,一个Tab如果因为某些原因崩溃了,不会影响到其它的Tab。
除了IE, Firefox, Opera,现在我们又有了Google Chrome,一个全新的开源浏览器产品?并不是全新的,但是它融合了多方的技术,在浏览器的关于里面,我们可以看到:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)
AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27
Safari/525.13
不管如何,这只是一个测试版,问题不少。
1. 太简洁了。。。简洁到我不知道收藏夹在哪里?即使我选择导入Firefox的收藏夹,我仍然不能在Chrome的任何地方找到它们。
2. 即使我选择了英文版本,但是在我的机器上,仍然显示了中文版本,而且我不知道在哪里可以修改,并且中文版本中默认的浏览器字体仍然不敢恭维。
3. 多进程的浏览器说,一个Tab崩溃了,其它Tab没事儿,但是Chrome在我试用的十几分钟内,却有一次强健到即使我点关闭按钮,它也仍然自顾自地运行在我的桌面上,唯一的办法是,Task Manager里面直接Kill掉它。。。这。。。强健的有些过头了。
4. 如果我在Chrome里面点击“Get bookmark Add-ons”,会把我扔到Firefox的Addons下载界面去,但是我无论如何也不知道该如何在Chrome里面把Addons安装上,点击下载,它就真的下载了xpi文件,我尝试用Chrome打开这个xpi文件,结果它又重新帮我copy了一份同样的xpi。
最后还是有好话的,启动速度确实快,页面渲染速度也确实快,闪电一样,只是不知道等什么时候装完十几个Addons以后会怎样,要知道FF3刚下载安装以后,启动速度也是惊人的。那时候如果Chrome还能闪电一样打开,我立刻抛弃Firefox,但是现在,我还是先把Chrome放到脑后吧。
哦,还有,将某个网页创建成桌面快捷方式,也是挺好玩的一件事情,一个单独的Google Reader界面和一个单独的Gmail界面,完美的Desktop Application和Web Application的结合。
Google Guys,尽快地release一个更少问题的版本吧。面对FF3,还有一段路需要追赶。
Update@2008-9-4
今天继续试用Chrome。
1. 对于它的速度实在是没有任何可以诟病的地方。
2. 没有Tab的控制,无处设置新的Tab创建在什么地方,无法设置地址栏中输入地址是要启动一个新的tab还是刷新当前Tab,也无法设定鼠标双击Tab页标签就可以关闭Tab页。表明推出的有些仓促,想当年谷歌输入法推出的时候就已经是一个很成熟的产品了。
3. 关于导入收藏夹的问题,我想是因为我的Firefox是Portable版本的,所以Chrome找不到他的具体位置,但是很明显应该设置一个可以从HTML文件中带入收藏夹的选项。
4. 内存占用可绝对不低,每个打开的新页面都是一个chrome进程,那些习惯一下子开十几个窗口的兄弟们要掂量一下自己的机器了。
看到一则比较有趣的评析。
Chrome将主要从哪一款浏览器手中抢夺用户?
《华尔街日报》专栏作家Kara Swisher撰文称,Google选在这一时刻发布浏览器是由于担心微软的IE8损害自身的搜索和广告业务。因此,Google将很乐于见到IE用户转向Chrome。不过,实际上火狐浏览器目前的用户更容易转向Chrome,因为火狐浏览器用户对浏览器的性能更重视,他们原本就是从IE转向火狐的。预计火狐浏览器的占有率将会下降。
Attention MySQL engineers and Drizzle contributors: upgrade to Bazaar 1.6.1 now to get some fairly massive performance speedups for bzr branch commands. As I noted in my last article on Launchpad code management, Bazaar 1.5 was having some performance issues when branching large project trees such as MySQL. In the article, I showed it was taking Bazaar 1.5 91 minutes to do the initial branch. With John Arbash Meinel's performance patches, the time to branch was cut down to 23 minutes, which is a fantastic improvement.
Ubuntu users: grab the 1.6.1 Bazaar package for your Ubuntu version from the Launchpad.net Bazaar Project Package Archive.
Mac OSX users:: grab the disk image here, with these instructions.
Windows users: grab the Windows installer for 1.6.1rc from the Launchpad repository.
We've launched this year’s AWS Start-Up Challenge, a contest for entrepreneurs and
start-ups that will award the winner $50,000 in cash, $50,000 in AWS credits, a
potential investment offer from Amazon.com, and more. Submissions will be
accepted until October 3, 2008.
Learn more about the contest and enter your great idea today.
-- Jeff;







