Hello,

I analize my mysql slow query log and see this:

"
# Time: 040320 15:35:31
# [EMAIL PROTECTED]: maxpcco_autoresp[maxpcco_autoresp] @ localhost []
# Query_time: 5  Lock_time: 0  Rows_sent: 764220  Rows_examined: 764220
SET last_insert_id=764597;
SELECT LAST_INSERT_ID() AS id FROM arp3_cam;
# [EMAIL PROTECTED]: maxpcco_autoresp[maxpcco_autoresp] @ localhost []
# Query_time: 5  Lock_time: 0  Rows_sent: 764222  Rows_examined: 764222
SET last_insert_id=764599;
SELECT LAST_INSERT_ID() AS id FROM arp3_cam;
# Time: 040320 15:35:33
# [EMAIL PROTECTED]: maxpcco_autoresp[maxpcco_autoresp] @ localhost []
# Query_time: 7  Lock_time: 0  Rows_sent: 764221  Rows_examined: 764221
SET last_insert_id=764598;
SELECT LAST_INSERT_ID() AS id FROM arp3_cam;
# Time: 040320 15:35:34
# [EMAIL PROTECTED]: maxpcco_autoresp[maxpcco_autoresp] @ localhost []
# Query_time: 6  Lock_time: 0  Rows_sent: 764224  Rows_examined: 764224
SET last_insert_id=764601;
SELECT LAST_INSERT_ID() AS id FROM arp3_cam;
# [EMAIL PROTECTED]: maxpcco_autoresp[maxpcco_autoresp] @ localhost []
# Query_time: 8  Lock_time: 0  Rows_sent: 764223  Rows_examined: 764223
SET last_insert_id=764600;
SELECT LAST_INSERT_ID() AS id FROM arp3_cam;
"

Why these query are much slow to me?

SET last_insert_id=(number);
SELECT LAST_INSERT_ID() AS id FROM arp3_cam;
 
Its necessary to examine all rows to get last id?
Its possible to change anything to speed up this query?


Thanks,
Anderson Oliveira.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to