I found it interesting. Thanks Eric.
>>(reconstructed from archives i accidentally deleted the copy in my mailbox
>>>Daniel Clark writes:
>>>I don't see how LIMIT would make a difference. LAST_INSERT_ID() only
>>>returns one record.
>>>But it's worth trying in a big loop to get timing numbers
(reconstructed from archives i accidentally deleted the copy in my mailbox
Daniel Clark writes:
I don't see how LIMIT would make a difference. LAST_INSERT_ID() only
returns one record.
But it's worth trying in a big loop to get timing numbers.
Well, I decided to test this all out and see what ha
I don't see how LIMIT would make a difference. LAST_INSERT_ID() only returns one
record.
But it's worth trying in a big loop to get timing numbers.
>>I have a rather simple straightforward question that I was not able to find
>>in any of the documentation.
>>I am in the process of writing an
LAST_INSERT_ID is connection-specific, not table-specific. When you say,
SELECT LAST_INSERT_ID() FROM foo;
you are asking for the LAST_INSERT_ID to be repeated once for each row of
table foo. This is analogous to
SELECT NOW() FROM foo;
or
SELECT 2 FROM foo;
Adding a LIMIT would work, but
Hello,
I have a rather simple straightforward question that I was not able to find
in any of the documentation.
I am in the process of writing an application, and I was wonder whether
there is any benefit (or penalty) in LIMIT(ing) a LAST_INSERT_ID() query?
i.e.
SELECT LAST_INSERT_ID() FROM foo