File: cardinality.sql

package info (click to toggle)
percona-toolkit 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 68,916 kB
  • sloc: perl: 241,287; sql: 22,868; sh: 19,746; javascript: 6,799; makefile: 353; awk: 38; python: 30; sed: 1
file content (49 lines) | stat: -rw-r--r-- 694 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
DROP DATABASE IF EXISTS cardb;
CREATE DATABASE cardb;
USE cardb;
CREATE TABLE t (
  high  INT UNSIGNED NOT NULL,
  low   INT UNSIGNED NOT NULL,
  INDEX a (low),
  INDEX b (high),
  INDEX c (low)
) ENGINE=InnoDB;
INSERT INTO t VALUES
  (1,   1),
  (2,   1),
  (3,   1),
  (4,   1),
  (5,   1),
  (6,   1),
  (7,   1),
  (8,   1),
  (9,   1),
  (10,  1),
  (11,  1),
  (12,  1),
  (13,  1),
  (14,  1),
  (15,  1),
  (16,  1),
  (17,  1),
  (18,  1),
  (19,  1),
  (20,  1),
  (21,  2),
  (22,  2),
  (23,  2),
  (24,  2),
  (25,  2),
  (26,  2),
  (27,  2),
  (28,  2),
  (29,  2),
  (30,  2),
  (31,  2),
  (32,  2),
  (33,  2),
  (34,  2),
  (35,  2),
  (36,  2),
  (37,  2);
ANALYZE TABLE t;