Archive for May, 2010

The 22 minute meeting

It seems like short and effective meetings are becoming a hot topic – check out this awesome presentation on the 22 minute meeting by Nicole Steinbok.

And here is a download link for the 22 minute meeting poster mentioned in the presentation.

Motivation – take daily

People often say that motivation doesn’t last. Well, neither does bathing – that’s why we recommend it daily.

Zig Ziglar, motivation speaker.

MySQL: Optimizing Stored Routines

Roland Bouman published his presentation for the MySQL User Conference and Expo 2010 on optimizing MySQL stored routines. His recommendations are based on test measurements using benchmark() function.

The summary is short but could be very useful.

Optimizing Stored Routines

MySQL: stored procedure return statement

It is a bit confusing that MySQL function supports return statement but stored procedure does not.

However there is LEAVE statement which can serve the same goal:

this statement is used to exit the flow control construct that has the given label. It can be used within BEGIN … END or loop constructs (LOOP, REPEAT, WHILE).

For example the stored procedure below returns the passed number only if it is non-zero:

DROP PROCEDURE IF EXISTS TestProc;
CREATE PROCEDURE TestProc
(
  vTestNum INT
)
TOP:BEGIN
 
IF vTestNum = 0 THEN
  LEAVE TOP;
END IF;
 
SELECT vTestNum;
 
END;

MySQL: Insert delayed gotcha within stored procedures

There are many restrictions on stored routines and triggers. However it turned out though a query is fallen under the restrictions it may not cause an error message but simply work a different way. So developers may not be aware that their queries do not work as expected.

For example, inserts cannot be delayed within stored procedures BUT INSERT DELAYED syntax is accepted. The statement is handled as a normal INSERT though.

Working on the task which involved high insert load, we debated either utilize delayed insert or regular one. Later it turned out that delayed insert was not even an option. Thus stay on guard and don’t let MySQL to confuse you. 🙂