ALTER TABLE `0p4_sale_order_detail` 
ADD INDEX `idx_soid`(`sale_order_id`),
ADD INDEX `idx_lineno`(`line_no`);

ALTER TABLE `0p4_good_issue_note` 
ADD INDEX `idx_type`(`type`),
ADD INDEX `idx_id`(`id`);