On Wed, Sep 17, 2003 at 03:07:41PM -0700, Scot Campbell wrote: > These will be random atomic Inserts originating from a Web page. > > I'm not sure I catch your drift. The inserts are not in a batch. > > I need to notify the user on the page which field was in error. I'd like to > refer to the index name in the schema and relate it to the field that > contains the non-duplicate data (i.e., error message on the email address > vs. error message on the userid field).
What I'm saying is this. If you expect most inserts to succeede, then code that way. Insert a row. If it fails, then go to the effort of finding the offending key. Otherwise, if you check every key before the insert, you're wasting effort most of the time. That's all. -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQL 4.0.15-Yahoo-SMP: up 4 days, processed 158,913,444 queries (438/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]