MySQL always tries to make toast of my good ideas. This is the
only time is succeeds in making toast (see bug #2). |
This time I'm working on star schema optimzation (which will be my next blog post). MySQL takes about .24 seconds to project out a list of parts that match a filter, but it takes 43 (not .43, FORTY-THREE) seconds to turn it into a CSV list using GROUP_CONCAT.
select P_PartKey from part where where P_MFGR = 'MFGR#1' or P_MFGR='MFGR#2';
399597 rows in set (0.24 sec)
mysql> select group_concat(P_PartKey) into @pkey from part where P_MFGR = 'MFGR#1' or …