The shipping function of the customer service is very slow.

Source: Internet
Author: User

The customer-generated miscellaneous warehouse picking function is very slow. The reasons for the preliminary test are as follows:

As the data volume grows rapidly from precision to each shard, the data volume in the beginning + first month reaches 500 million.

As a result, some validators are very slow.

Example 1:

DECLARE
V_ava_qty NUMBER;
BEGIN
V_ava_qty: = inv_item_inq.get_available_qty (p_organization_id => 83,
P_inventory_item_id => 1317,
P_revision => NULL,
P_subinventory_code => 'b01 ',
P_locator_id => 15,
P_lot_number => 'beha1mx-TP1B331A01 ',
P_cost_group_id =>-1,
P_revision_control => 'false ',
P_lot_control => 'true ',
P_serial_control => 'false ');
Dbms_output.put_line (v_ava_qty );
END;

During shipment, check the available quantity> = shipment.

Using this program to get the available amount is very slow. In the development environment, the program is not found to be so slow due to a small amount of data.

 

Change it:

Select sum (moq. transaction_quantity)
INTO p_onhand_qty
FROM mtl_onhand_quantities moq
WHERE moq. organization_id = p_inv_org_id
AND moq. subinventory_code = p_subinv
AND nvl (moq. locator_id,-1) = nvl (p_locator_id,-1)
AND moq. inventory_item_id = p_item_id
AND moq. lot_number = p_lot_number;

Select sum (mr. primary_reservation_quantity)
INTO p_res_qty
FROM mtl_reservations mr
WHERE mr. organization_id = p_inv_org_id
AND mr. subinventory_code = p_subinv
AND mr. supply_source_type_id = 13
AND nvl (mr. locator_id,-1) = nvl (p_locator_id,-1)
AND mr. inventory_item_id = p_item_id
AND mr. lot_number = p_lot_number;

RETURN nvl (p_onhand_qty, 0)-nvl (p_res_qty, 0 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.