|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Rob Wultsch (wultsch
gmail.com)
Date: Wed Oct 15 2008 - 13:04:06 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I would do a muli key PK with a after insert trigger to that would
change widget_number 1 to 1000. Just my HO...
> I would use this combo as the primary key, but I hate doing joins with
> multiple primary keys, so I'll also keep the widget_id for the purpose of
> making joins easier.
Why? Both of these fields are ints, so the key length would rather small.
> I don't think the 'MAX' is optimized, though and maybe there is a better,
> more robust way to do this which is already built into MySQL that I don't
> know about.
MAX should be fast, assuming the field is indexed.
--
Rob Wultsch
wultsch
gmail.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]