SELECT LAST_INSERT_ID()
Hello,
I have suggestion for you:
SELECT LAST_INSERT_ID() FROM table shouldn't go through the whole table.It takes a lot of time on a big table.
LAST_INSERT_ID() suggest that DESC(LAST_) is already implemented which is not.
So by default SELECT LAST_INSERT_ID() should be implemented as
SELECT LAST_INSERT_ID() FROM table ORDER By Id DESC LIMIT 1
Thanks.
Subject
Views
Written By
Posted
SELECT LAST_INSERT_ID()
1678
November 10, 2016 03:23AM
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.