<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    2010年1月4日

    c++ difference from java
    1. take charge of object management , negotiate ownershiop ,use scoped_ptr,
       not to transfer other's ownership
    2. use c++ template to express seperation corncern ,such as (static)polymorphy and policy
    3. disable copy constructor and assign operator by yourself
    4. polymorphy by pointer
    5. 使用 template ,macro 取得類似動態(tài)語言的能力
    6. 偏好無狀態(tài)的 函數(shù)
    posted @ 2010-02-03 11:43 西津渡 閱讀(260) | 評論 (0)編輯 收藏
     
        只有注冊用戶登錄后才能閱讀該文。閱讀全文
    posted @ 2010-01-15 12:22 西津渡 閱讀(100) | 評論 (0)編輯 收藏
     

    Myisam is preferred without transaction and little update(delete)

    Big than 4G datafile can user Myisam merge table.

    InnoDB with auto_increment primary key is preferred.

    Few storage process

    Guess: 20m records max per table , 500G data max per tablespace , 256 tables per database (may problem)

    Use prepared statement and  batch

    Optimize Your Queries For the Query Cache

    // query cache does NOT work
    $r = mysql_query("SELECT username FROM user WHERE signup_date >= CURDATE()");
     
    // query cache works!
    $today = date("Y-m-d");
    $r = mysql_query("SELECT username FROM user WHERE signup_date >= '$today'");

    EXPLAIN Your SELECT Queries

    LIMIT 1 When Getting a Unique Row

    Index and Use Same Column Types for Joins

    Do Not ORDER BY RAND()

    Avoid SELECT *

    t is a good habit to always specify which columns you need when you are doing your SELECT’s.

    Use ENUM over VARCHAR

    Use NOT NULL If You Can

    Store IP Addresses as UNSIGNED INT (?)

    Fixed-length (Static) Tables are Faster

    Vertical Partitioning

    Vertical Partitioning is the act of splitting your table structure in a vertical manner for optimization reasons.

    Example 1: You might have a users table that contains home addresses, that do not get read often. You can choose to split your table and store the address info on a separate table. This way your main users table will shrink in size. As you know, smaller tables perform faster.

    Example 2: You have a “last_login” field in your table. It updates every time a user logs in to the website. But every update on a table causes the query cache for that table to be flushed. You can put that field into another table to keep updates to your users table to a minimum.

    But you also need to make sure you don’t constantly need to join these 2 tables after the partitioning or you might actually suffer performance decline.

    Split the Big DELETE or INSERT Queries

    If you have some kind of maintenance script that needs to delete large numbers of rows, just use the LIMIT clause to do it in smaller batches to avoid this congestion.

    Smaller Columns Are Faster

    Use an Object Relational Mapper

    f you do not need the time component, use DATE instead of DATETIME.

    Consider horizontally spitting many-columned tables if they contain a lot of NULLs or rarely used columns.

    Be an SQL programmer who thinks in sets, not procedural programming paradigms

    InnoDB can’t optimize SELECT COUNT(*) queries. Use counter tables! That’s how to scale InnoDB.

    Prefer MM with hive

    refer :

    http://blog.tuvinh.com/top-20-mysql-best-practices/

    posted @ 2010-01-05 13:38 西津渡 閱讀(388) | 評論 (0)編輯 收藏
     
        只有注冊用戶登錄后才能閱讀該文。閱讀全文
    posted @ 2010-01-04 15:11 西津渡 閱讀(77) | 評論 (0)編輯 收藏
     
    主站蜘蛛池模板: 日韩午夜理论免费TV影院 | 18禁美女黄网站色大片免费观看| 亚洲AV日韩AV天堂久久| 国产福利在线免费| 看成年女人免费午夜视频| 亚洲不卡AV影片在线播放| 日本免费人成网ww555在线| 亚洲日本中文字幕区| 日本免费v片一二三区| 国产啪精品视频网站免费尤物| 日韩亚洲产在线观看| 国产精品V亚洲精品V日韩精品 | 亚洲高清无码在线观看| 久久免费观看国产精品88av| 天天爽亚洲中文字幕| 亚洲精品成人网久久久久久| 在免费jizzjizz在线播| 一级做α爱过程免费视频| 亚洲小视频在线播放| 中文字幕在线亚洲精品| 成人啪精品视频免费网站| 永久在线观看免费视频| 美女又黄又免费的视频| 亚洲国语在线视频手机在线| 久久久久亚洲精品无码网址| 免费观看男人免费桶女人视频| 久久久精品免费视频| 免费的黄网站男人的天堂| 亚洲成a人片77777老司机| 亚洲电影日韩精品| 69影院毛片免费观看视频在线| 偷自拍亚洲视频在线观看99| 亚洲人成影院在线高清| 亚洲成AV人片在线观看ww| 亚洲国产精品成人网址天堂| A级毛片内射免费视频| 在线看片免费人成视久网| 中文字幕免费观看视频| 免费看一级高潮毛片| 色偷偷噜噜噜亚洲男人| 亚洲字幕AV一区二区三区四区|