Code Monkey home page Code Monkey logo

Comments (7)

git-zjx avatar git-zjx commented on June 22, 2024

如果没有主键的表,有一个普通索引,怎么回表?

没有主键的表,InnoDB会给默认创建一个Rowid做主键

from git-zjx.github.io.

git-zjx avatar git-zjx commented on June 22, 2024

一个InnoDB引擎的表,数据量非常大,根据二级索引搜索会比主键搜索快?

只有使用覆盖索引时会

from git-zjx.github.io.

git-zjx avatar git-zjx commented on June 22, 2024

非聚集索引上为什么叶子节点不是数据行的地址,而是主键 id?

这个叫作“堆组织表”,MyISAM 就是这样的,各有利弊。在修改了数据的位置的情况,InnoDB 这种模式会更方便些

from git-zjx.github.io.

git-zjx avatar git-zjx commented on June 22, 2024

如果磁盘中的主键索引已经存储了这个表的全部数据的话,那常说的没走索引是遍历整个B+树还是其他地方还有整个表的数据呢?

就是遍历这个主键索引的意思

from git-zjx.github.io.

git-zjx avatar git-zjx commented on June 22, 2024

InnoDB B+树主键索引的叶子节点存的是什么?

B+树的叶子节点是page (页),一个页里面可以存多个行

from git-zjx.github.io.

git-zjx avatar git-zjx commented on June 22, 2024

非叶子节点存储大约 1200个是怎么算出来的?

整型 4 个字节,加上辅助数据差不多每个key占13字节,16k/13

from git-zjx.github.io.

git-zjx avatar git-zjx commented on June 22, 2024

为什么树高20就是20个数据块?

每个叶子结点就是一个块,每个块包含两个数据,块之间通过链式方式链接。树高20的话,就要遍历20个块

from git-zjx.github.io.

Related Issues (20)

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.