I have a table with 3 fields, 'id', 'date', and 'value'. I've created a unique index on 'id' and 'date' in order to lookup 'value' quickly. I would like to be able to add 'value' to the index so that the data files does not have to be referenced and will allow faster lookups and groupings by date, however, I can't lose the ability to do "insert ignore" on the 'id' and 'date' unique index. So the question is, if I create a primary key of 'id', 'date', 'value', and then create a secondary unique index of 'id' and 'date' will MySQL simply reuse the primary key for the secondary unique index or will it create a totally separate index on the disk? If it creates a totally separate index then it will just have to update two indexes for every insert which in the end will slow things down.

-Dan


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to