-- Add indexes for dashboard query performance
ALTER TABLE PL_BILL ADD INDEX idx_pl_bill_refno (REFNO);
ALTER TABLE PL_BILL ADD INDEX idx_pl_bill_accno (ACCNO);
ALTER TABLE PL_BILL ADD INDEX idx_pl_bill_docdtetme (DOCDTETME);

ALTER TABLE PL_BILLTRAN ADD INDEX idx_pl_billtran_refno (REFNO);
ALTER TABLE PL_BILLTRAN ADD INDEX idx_pl_billtran_stockcode (STOCKCODE);

ALTER TABLE PL_SUPPLIERACCOUNT ADD INDEX idx_pl_supplier_suplcde (SUPLCDE);

ALTER TABLE SL_SALESINVOICE ADD INDEX idx_sl_invoice_refno (REFNO);
ALTER TABLE SL_SALESINVOICE ADD INDEX idx_sl_invoice_accno (ACCNO);
ALTER TABLE SL_SALESINVOICE ADD INDEX idx_sl_invoice_docdtetme (DOCDTETME);

ALTER TABLE SL_SALESINVOICETRAN ADD INDEX idx_sl_invoicetran_refno (REFNO);
ALTER TABLE SL_SALESINVOICETRAN ADD INDEX idx_sl_invoicetran_stockcode (STOCKCODE);

ALTER TABLE SL_CUSTOMERACCOUNT ADD INDEX idx_sl_customer_dbtrcde (DBTRCDE);

ALTER TABLE STK_STOCKITEM ADD INDEX idx_stk_stockcode (STOCKCODE);
ALTER TABLE STK_STOCKITEM ADD INDEX idx_stk_category (CATEGORY);
ALTER TABLE STK_STOCKITEM ADD INDEX idx_stk_isactive (ISACTVE);

ALTER TABLE STK_STOCKCATEGORY ADD INDEX idx_stk_category_cde (STCKCTGRYCDE);
