Re: Hanging on copying to tmp table
Do you think it would work if I remove bug (and known_error) from the query?
I know it would make a lot more requests to the database, but if it could solve the problem it would be fine.
explain
SELECT SQL_CACHE
`node`.`is_folder`
, `node`.`id`
, `node`.`name`
, (COUNT(`parent`.`name`)-1) AS `level`
, `node`.`lft`
, `node`.`rgt`
, `node`.`status_id`
FROM `test_testcase` AS `node`, `test_testcase` AS `parent`
WHERE `node`.`lft` BETWEEN `parent`.`lft` AND `parent`.`rgt`
GROUP BY `node`.`lft`
ORDER BY `node`.`lft`;
1, 'SIMPLE', 'node', 'ALL', 'indx_testcase_lft', '', '', '', 9449, 'Using temporary; Using filesort'
1, 'SIMPLE', 'parent', 'ALL', 'indx_testcase_rgt,indx_testcase_lft', '', '', '', 9449, 'Range checked for each record (index map: 0x6)'