I have a large table (approximately 100,000 records) that has no unique reference columns (in it's current configuration).
Example configuration:
Main Table - Support Call IDs (PRIMARY KEY)
call_id
0001
0002
0003
Data Table - Comments
call_id comment_num
0001 0001
0001 0002
0001 0003
0002 0001
0002 0002
0003 0001
0003 0002
0003 0003
0003 0004
0003 0005
Now, my question is this .. would it be smarter (and more importantly faster) to combine the two columns into one unique indexed column rather than indexing the two non-unique columns in the Comments Table like this:
callid_commentnum
0001_0001
0001_0002
0001_0003
0002_0001
0002_0002
0003_0001
0003_0002
0003_0003
0003_0004
0003_0005
.. and then make that column a primary key since each callid_commentnum value would be unique?
The bottom line question I have is ..
Is it faster to scan a large table using one PRIMARY KEY column or two INDEXed columns for records or does it matter with MySQL?
Thanks,
twixxer