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
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to