Re: Performance of ON DUPLICATE KEY and other options?
Jay Pipes wrote:
> What is the benefit of updating the QID at all if
> the query text matches?
>
I don't want to update QID when the text matches, but on the man page for ON DUPLICATE KEY UPDATE, it says that
ON DUPLICATE KEY UPDATE qid=LAST_INSERT_ID(qid)
is how you prime LAST_INSERT_ID() to return the value for pre-existing entries so that
SELECT LAST_INSERT_ID()
will give you back the last id, pre-existing or not.
I just tried
ON DUPLICATE KEY UPDATE LAST_INSERT_ID(qid)
and it doesn't parse.
Thanks
-mark
Subject
Views
Written By
Posted
2236
September 23, 2005 09:20AM
1347
September 23, 2005 10:48AM
Re: Performance of ON DUPLICATE KEY and other options?
1421
September 23, 2005 10:56AM
1348
September 23, 2005 11:20AM
1486
September 23, 2005 11:38AM
1357
September 23, 2005 03:33PM
1356
September 23, 2005 04:25PM
1287
September 23, 2005 04:59PM
1505
September 26, 2005 02:30PM
1372
November 10, 2005 10:12AM
1409
November 10, 2005 10:26AM
1329
November 10, 2005 02:19PM
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.