Git Product home page Git Product logo

use-the-index-luke's Introduction

USE-THE-INDEX-LUKE 中文翻译

原文 https://use-the-index-luke.com

文章目录

(创建对应 md 文件,并修改如下 title 为中文)

  1. 前言 — 为什么索引是一项开发任务?
  2. Anatomy of an Index — What does an index look like?
    1. The Leaf Nodes — A doubly linked list
    2. The B-Tree — It’s a balanced tree
    3. Slow Indexes, Part I — Two ingredients make the index slow
  3. The Where Clause — Indexing to improve search performance
    1. The Equals Operator — Exact key lookup
      1. Primary Keys — Verifying index usage
      2. Concatenated Keys — Multi-column indexes
      3. Slow Indexes, Part II — The first ingredient, revisited
    2. Functions — Using functions in the where clause
      1. Case-Insensitive SearchUPPER and LOWER
      2. User-Defined Functions — Limitations of function-based indexes
      3. Over-Indexing — Avoid redundancy
    3. Bind Variables — For security and performance
    4. Searching for Ranges — Beyond equality
      1. Greater, Less and BETWEEN — The column order revisited
      2. Indexing SQL LIKE FiltersLIKE is not for full-text search
      3. Index Combine — Why not using one index for every column?
    5. Partial Indexes — Indexing selected rows
    6. NULL in the Oracle Database — An important curiosity
      1. NULL in Indexes — Every index is a partial index
      2. NOT NULL Constraints — affect index usage
      3. Emulating Partial Indexes — using function-based indexing
    7. Obfuscated Conditions — Common anti-patterns
      1. Dates — Pay special attention to DATE types
      2. Numeric Strings — Don’t mix types
      3. Combining Columns — use redundant where clauses
      4. Smart Logic — The smartest way to make SQL slow
      5. Math — Databases don’t solve equations
  4. Testing and Scalability — About hardware
    1. Data Volume — Sloppy indexing bites back
    2. System Load — Production load affects response time
    3. Response Time and Throughput — Horizontal scalability
  5. The Join Operation — Not slow, if done right
    1. Nested Loops — About the N+1 selects problem in ORM
    2. Hash Join — Requires an entirely different indexing approach
    3. Sort-Merge Join ‌— Like a zipper on two sorted sets
  6. Clustering Data — To reduce IO
    1. Index Filter Predicates Intentionally Used — to tune LIKE
    2. Index-Only Scan — Avoiding table access
    3. Index-Organized Table — Clustered indexes without tables
  7. Sorting and Grouping — Pipelined order by: the third power
    1. Indexed Order Bywhere clause interactions
    2. ASC/DESC and NULL FIRST/LAST — changing index order
    3. Indexed Group By — Pipelining group by
  8. Partial Results — Paging efficiently
    1. Selecting Top-N Rows — if you need the first few rows only
    2. Fetching The Next Page — The offset and seek methods compared
    3. Window-Functions — Pagination using analytic queries
  9. Insert, Delete and Update — Indexing impacts on DML statements
    1. Insert — cannot take direct benefit from indexes
    2. Delete — uses indexes for the where clause
    3. Update — does not affect all indexes of the table
原文目录链接

Table of Contents

  1. Preface — Why is indexing a development task?
  2. Anatomy of an Index — What does an index look like?
    1. The Leaf Nodes — A doubly linked list
    2. The B-Tree — It’s a balanced tree
    3. Slow Indexes, Part I — Two ingredients make the index slow
  3. The Where Clause — Indexing to improve search performance
    1. The Equals Operator — Exact key lookup
      1. Primary Keys — Verifying index usage
      2. Concatenated Keys — Multi-column indexes
      3. Slow Indexes, Part II — The first ingredient, revisited
    2. Functions — Using functions in the where clause
      1. Case-Insensitive SearchUPPER and LOWER
      2. User-Defined Functions — Limitations of function-based indexes
      3. Over-Indexing — Avoid redundancy
    3. Bind Variables — For security and performance
    4. Searching for Ranges — Beyond equality
      1. Greater, Less and BETWEEN — The column order revisited
      2. Indexing SQL LIKE FiltersLIKE is not for full-text search
      3. Index Combine — Why not using one index for every column?
    5. Partial Indexes — Indexing selected rows
    6. NULL in the Oracle Database — An important curiosity
      1. NULL in Indexes — Every index is a partial index
      2. NOT NULL Constraints — affect index usage
      3. Emulating Partial Indexes — using function-based indexing
    7. Obfuscated Conditions — Common anti-patterns
      1. Dates — Pay special attention to DATE types
      2. Numeric Strings — Don’t mix types
      3. Combining Columns — use redundant where clauses
      4. Smart Logic — The smartest way to make SQL slow
      5. Math — Databases don’t solve equations
  4. Testing and Scalability — About hardware
    1. Data Volume — Sloppy indexing bites back
    2. System Load — Production load affects response time
    3. Response Time and Throughput — Horizontal scalability
  5. The Join Operation — Not slow, if done right
    1. Nested Loops — About the N+1 selects problem in ORM
    2. Hash Join — Requires an entirely different indexing approach
    3. Sort-Merge Join ‌— Like a zipper on two sorted sets
  6. Clustering Data — To reduce IO
    1. Index Filter Predicates Intentionally Used — to tune LIKE
    2. Index-Only Scan — Avoiding table access
    3. Index-Organized Table — Clustered indexes without tables
  7. Sorting and Grouping — Pipelined order by: the third power
    1. Indexed Order Bywhere clause interactions
    2. ASC/DESC and NULL FIRST/LAST — changing index order
    3. Indexed Group By — Pipelining group by
  8. Partial Results — Paging efficiently
    1. Selecting Top-N Rows — if you need the first few rows only
    2. Fetching The Next Page — The offset and seek methods compared
    3. Window-Functions — Pagination using analytic queries
  9. Insert, Delete and Update — Indexing impacts on DML statements
    1. Insert — cannot take direct benefit from indexes
    2. Delete — uses indexes for the where clause
    3. Update — does not affect all indexes of the table

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.