MySQL Forums
Forum List  »  PHP

Re: Last ID from a 20k records table
Posted by: Rick James
Date: January 27, 2016 01:18PM

1) requires another round trip to the server, and another query to process.
2) is provided in the response to the INSERT; so it is essentially 'free'.

Also,... And this may be _more_ important... If someone else sneaks in with another INSERT, 1) will give you _his_ id; 2) will provide you _your_ id.

Options: ReplyQuote


Subject
Written By
Posted
Re: Last ID from a 20k records table
January 27, 2016 01:18PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.