Skip to main content
Fix typo
Source Link
Julien Vavasseur
  • 10.2k
  • 2
  • 28
  • 46

I let'sLet's say I have the following table:

Create Table Orders(server : tiny int, ticket : integer, primary key (server, ticket));

How is the composite primary key representation when stored on disk?

  1. server * 2^32 + ticket (a numeric composition of the two keys)
  2. server & " " & ticket (a string concatenation of the two attributes)
  3. SomthingSomething entirely different

I let's say I have the following table:

Create Table Orders(server : tiny int, ticket : integer, primary key (server, ticket));

How is the composite primary key representation when stored on disk?

  1. server * 2^32 + ticket (a numeric composition of the two keys)
  2. server & " " & ticket (a string concatenation of the two attributes)
  3. Somthing entirely different

Let's say I have the following table:

Create Table Orders(server : tiny int, ticket : integer, primary key (server, ticket));

How is the composite primary key representation when stored on disk?

  1. server * 2^32 + ticket (a numeric composition of the two keys)
  2. server & " " & ticket (a string concatenation of the two attributes)
  3. Something entirely different
edited title
Link
Tom V
  • 15.7k
  • 7
  • 64
  • 87

How does InnoDB represntrepresent composite integer keys?

Source Link

How does InnoDB represnt composite integer keys?

I let's say I have the following table:

Create Table Orders(server : tiny int, ticket : integer, primary key (server, ticket));

How is the composite primary key representation when stored on disk?

  1. server * 2^32 + ticket (a numeric composition of the two keys)
  2. server & " " & ticket (a string concatenation of the two attributes)
  3. Somthing entirely different