I mainly use SQL 2000 and Access for my DB stuff, so don't mind my lack of knowledge of MySQL. That aside, does MySQL support stored procedures? It would probably be a bit faster if you made a stored procedure that just returned the last record.
Rather then looking up the ID of the last record, and then retrieving it.
Comment on Re: Finding last added auto_increment id in mysql
i mainly use oracle or sometimes postgres (im not really a big mysql fan either), although mysql's dbd driver has lots of nice mysql-specific functionality; here's a rather promising implementation of stored procs, and in perl at that :
check it out