List:General Discussion« Previous MessageNext Message »
From:Dathan Vance Pattishall Date:March 28 2003 2:54am
Subject:RE: Choosing a column for primary key
View as plain text  
-Would joins of tables with character based primary keys be slower than
-those with numeric based keys?  

Yes a join on a character based key is generally slower then on an
integer key. Key lookups in general are faster on integer based keys.
Since your PRIMARY KEY storage requirement is 30 bytes, you can multiply
30*500,000 and get an idea in bytes how big the index is.

-Has anyone had experience implementing a
-character-based primary key in a table of non-trivial size (> 500,000
-rows)?  Thanks for any assistance or pointers.

Depending on your hardware, and the amount of spindles / memory and the
sort_buffer / table cache / join_key_buffer / tmp_table_size /
key_buffer etc size are, it can be done. Mysql is very good at this, but
my expectation may be a bit lower then your desired goal. So the next
question to ask yourself is what is your desired query per second with
this join?

Are you thinking on the order of 10s or 100s per second?

Choosing a column for primary keyAaron Williams28 Mar
  • RE: Choosing a column for primary keyDathan Vance Pattishall28 Mar
  • RE: Choosing a column for primary keyDon Read28 Mar