Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clustered indexes: add initial docs #4476

Merged
merged 29 commits into from
Dec 29, 2020
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ceb98c0
clustered indexes: add initial docs
morgo Dec 22, 2020
f3ee308
Merge branch 'master' into clustered-indexes
morgo Dec 22, 2020
a0b3aa2
Fix lint issues
morgo Dec 22, 2020
67c2620
Merge branch 'clustered-indexes' of github.com:morgo/docs into cluste…
morgo Dec 22, 2020
b6dd2bc
Update clustered-indexes.md
morgo Dec 23, 2020
00db7b0
Update clustered-indexes.md
morgo Dec 23, 2020
e4da8d1
clarify clustered index vs primary key
morgo Dec 23, 2020
0f9536f
Update system-variables.md
TomShawn Dec 24, 2020
4d52321
Update clustered-indexes.md
morgo Dec 24, 2020
57b0ff4
Update clustered-indexes.md
morgo Dec 24, 2020
0df8870
Merge branch 'master' into clustered-indexes
morgo Dec 24, 2020
2a36a87
Update clustered-indexes.md
morgo Dec 24, 2020
960cf36
Fix broken anchor
morgo Dec 24, 2020
48dc189
Update clustered-indexes.md
morgo Dec 24, 2020
45c1713
Update clustered-indexes.md
morgo Dec 24, 2020
f8058ef
Update clustered-indexes.md
morgo Dec 24, 2020
e44f3b2
Update clustered-indexes.md
morgo Dec 24, 2020
971de04
Update clustered-indexes.md
morgo Dec 24, 2020
5966e77
Update clustered-indexes.md
morgo Dec 25, 2020
4e55db2
Merge branch 'master' into clustered-indexes
TomShawn Dec 25, 2020
6a992cc
Merge remote-tracking branch 'upstream/master' into clustered-indexes
morgo Dec 27, 2020
b15e2d2
Add suggestions
morgo Dec 27, 2020
7666c24
Merge branch 'master' into clustered-indexes
TomShawn Dec 28, 2020
c0289ba
Update clustered-indexes.md
morgo Dec 28, 2020
aa2c848
Update clustered-indexes.md
morgo Dec 28, 2020
1132bea
Update clustered-indexes.md
morgo Dec 28, 2020
c3adf87
Update clustered-indexes.md
morgo Dec 28, 2020
762c897
Update clustered-indexes.md
morgo Dec 28, 2020
7de0023
Merge branch 'master' into clustered-indexes
TomShawn Dec 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update clustered-indexes.md
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
  • Loading branch information
morgo and TomShawn authored Dec 25, 2020
commit 5966e779ab077b655a9be58671832b4fd35a7d20
2 changes: 1 addition & 1 deletion clustered-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Records: 2 Duplicates: 0 Warnings: 0
1 row in set (0.00 sec)
```

The `EXPLAIN` results look similar, but in the second example TiDB must first read the `PRIMARY KEY` index on `guid` in order to find the `handle` value. This is more obvious in the following example where the value of the `PRIMARY KEY` is not in the index on `does_not_cluster_by_default.b`. An extra lookup must be performed on the table rows (`└─TableFullScan_5`) to convert the `handle` to the `PRIMARY KEY` value of `guid`:
The two `EXPLAIN` results above look similar, but in the second example, TiDB must first read the `PRIMARY KEY` index on the `guid` column in order to find the `handle` value. This is more obvious in the following example where the `PRIMARY KEY` value is not in the index on `does_not_cluster_by_default.b`. TiDB must perform an extra lookup on the table rows (`└─TableFullScan_5`) to convert the `handle` value to the `PRIMARY KEY` value of `guid`:

```sql
EXPLAIN SELECT id FROM always_clusters_in_all_versions WHERE b = 'aaaa';
Expand Down