Something About Mysql Database Index

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Something About Mysql Database Index - Presentation Transcript

    1. Daniel.hu [email_address]
      • HASH vs B+ Tree
      • Cluster Index vs No Cluster Index
      • INNODB vs MYISAM
      • Insert performance
        • Batch INSERT and REPLACE
        • Use LOAD DATA instead of INSERT
        • Other tricks
            • Forbidden Foreign key
            • Forbidden Index
            • Rebuild Index
      • Do you always need index on WHERE column
      • Does the order of columns in an index matter
      • IN vs OR
      • IN vs OR
      • large IN clauses are problematic
      • Explain
      • Make sure you strike a good balance for indexing
        • Too many adversely affects data input
        • Too few adversely affects reads
      • Order of columns in an index matters!
      • Covering indexes are the fastest query possible
      • Consider the impact of duplicate rows
        • Avoid SELECT DISTINCT if it doesn’t cause a problem
        • Use UNION ALL instead of UNION if duplicate rows are acceptable
      • Use foreign key as index or create independent index
      • Despite what you see in examples, avoid SELECT *
      • Operators in the WHERE clause make a big difference
        • Avoid <> and LIKE
        • Use EXISTS, NOT EXISTS, and LEFT JOINS instead of NOT IN
      • If you must use LIKE, make the first character a literal
      • Don’t use ORDER BY unless you really need it
      • Don’t use Count(…) where to protect data integeration
      • Don't use ORDER BY RAND() when data is huge
      • http://dev.mysql.com/doc/refman/5.1/zh/optimization.html#insert-speed
      • http://www.xaprb.com/blog/2006/07/04/how-to-exploit-mysql-index-optimizations/
      • http://www.informit.com/articles/article.aspx?p=377652
      • Thank you!

    + dearhwjdearhwj, 2 years ago

    custom

    1076 views, 2 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1076
      • 1076 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 32
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories