不加条件查询速度挺快,加上过滤条件就特别慢
select id, arrive_order_code, arrive_time, audit_date, auditor, auxiliary_net_quantity, created_at, creator_id, creator_name, deduct_quantity, deduct_rate, discern_plate_number, enter_time, exit_time, gh_full_id, gh_full_name, gh_id, gh_name, is_affirm, is_audit, is_concrete, is_exit, is_multiplication, is_red, is_removed, is_return, is_tare, labour_id, labour_name, maker, maker_date, modifier_id, modifier_name, order_bar_code, order_code, order_data_id, order_date, order_origin, order_type, org_id, org_name, ori_gh_id, ori_labour_id, ori_order_id, ori_org_id, ori_org_name, ori_stockbin_id, plate_number, print_times, purchase_order_code, real_org_id, recorded_date, remark, rough_quantity, service_type, sort_time, stockbin_full_name, stockbin_id, stockbin_name, supplier_id, supplier_name, tare_quantity, updated_at, version, weight_type, material_code, material_name, net_quantity from v_pumpdata a where 1=1 and a.recorded_date = '2021-10-28' and a.supplier_id in (843783693889536,843779066475008,843780861416448,1038660285493760,843785130889728,1032222529778234,820438866227200,977088800217600,820438619034624,843782344118784,1033013418963457,989523081402880,843784102761472,843787766879232,969251156343296,1009623844638720,1033470504857639,1067502691759111,1028861662755344) limit 0,10
select a.* from t_pumpdata a inner join t_pumpmaterial b on a.id=b.order_id where a.recorded_date='2021-10-01'
这一句这么简单要1分多钟才能查询出来