SELECT LAST_INSERTID() very sloooow

2002-01-25 Thread Marek Kustka
Hi all, following query SELECT LAST_INSERT_ID() as auto_num FROM xrenders; fills our whole slow query log (500 kB a day). AUTO_INCREMENT field is int(11) type, primary key; table is of type MyISAM. We do the same operation on another similar table of the same db which is much larger without

Re: SELECT LAST_INSERTID() very sloooow

2002-01-25 Thread Fred van Engen
On Fri, Jan 25, 2002 at 02:22:12PM +0100, Marek Kustka wrote: following query SELECT LAST_INSERT_ID() as auto_num FROM xrenders; fills our whole slow query log (500 kB a day). Just do 'select last_insert_id() as auto_num'. The id isn't kept per table anyway, it is kept per session.

Re: SELECT LAST_INSERTID() very sloooow

2002-01-25 Thread Marek Kustka
Fred van Engen wrote: On Fri, Jan 25, 2002 at 02:22:12PM +0100, Marek Kustka wrote: following query SELECT LAST_INSERT_ID() as auto_num FROM xrenders; fills our whole slow query log (500 kB a day). Just do 'select last_insert_id() as auto_num'. The id isn't kept per table anyway, it