SELECT `plug_cat_join_cat_item`.`id` as cii, `plug_cat_join_cat_item`.`item` as jjj FROM `plug_cat_join_cat_item`
JOIN (SELECT `write_id`,`attr` FROM `plug_cat_vals` ) as ch ON ch.`write_id` = `plug_cat_join_cat_item`.`id`
LIMIT 64,8
SELECT item.*
FROM plug_cat_join_cat_item item
LEFT JOIN plug_cat_vals val ON val.write_id = item.id
WHERE val.write_id IS NOT NULL
LIMIT 64, 8