5.22

[rails db indexing]

Using Indexes to Improve Rails Performance
谈到了如何正确用index 何时用用哪一个如何用
If you measure your database performance in seconds rather than milliseconds, then it might be time to look at all your queries and indexes to see if you’re missing something.

Having indexes improves query performance, but can hurt other kinds of database
operations: inserts, updates, and deletes. If your app changes the data in your
database frequently, then you need to consider the performance penalties of
indexes on those operations.When table data changes, all the indexes need to be
updated. You’ll have to find a balance between query performance and transaction
performance. Some testing and measurements may be needed. Once you create a
fifth or sixth index on a table, you should really stop and think about it. What
kinds of :conditions are you using in your queries? Can they be changed to use
existing indexes? If your database is almost entirely used for queries, not
transactions, then have no fear. Indexes are what you want. In practice, indexes
will have negligible impact on create, read, and delete operation performance.


Also, the on-disk size of an index depends on the columns of that index. So, if you’ve got a string column that has a length measured in hundreds or thousands, than you should probably not include it in an index. Your VARCHAR(32000) columns are not the best candidates for indexes. Use them only if you have a very good reason.
----

[Community]

Why the sea is boiling hot
又见口水仗 DHH的任务之一就是把水搅浑 哈哈 不过暂不论两方的论点 像DHH这样的strong
opionated的leader还是很必要的 无论他是错误的还是正确的 很多观念在这样的争执中得
到了更大程度的曝光
----
[rails mailer GAP]

How To: Use GMail as your mail server for Rails 2.0!
----

你可能感兴趣的:(Blog,Rails,Gmail,performance)