I’ve optimized this exact scenario multiple times for pricing management in ICS 2023-1. Your performance issues come from three distinct problems that need coordinated solutions:
Query Plan Optimization: The immediate fix is creating a proper composite index. Execute this on your PRICE_LIST_ITEMS table:
CREATE INDEX idx_price_customer_date
ON PRICE_LIST_ITEMS(customer_id, effective_date, expiry_date)
INCLUDE (item_id, price_amount, currency_code);
The INCLUDE clause adds covering index benefits - the query won’t need to access the base table at all for standard price lookups. This should reduce your query time from 30-45 seconds to under 2 seconds immediately.
Index Optimization Strategy: Beyond the main lookup index, add these supporting indexes for common query patterns:
- Index on (item_id, effective_date) for item-based price searches
- Index on (price_list_id, customer_id) for price list management operations
Review your existing single-column customer_id index - if it’s not being used after adding the composite index, drop it to reduce index maintenance overhead during updates.
Stats Update Configuration: Your statistics are almost certainly stale given the query optimizer’s poor choices. Implement an automated statistics refresh schedule:
Navigate to Database Maintenance > Statistics Management and configure:
- PRICE_LIST_ITEMS: Update statistics every 3 days (high-change table)
- PRICE_LISTS: Weekly updates sufficient
- Set sampling rate to 30% for faster stats collection
Manually update statistics immediately after creating new indexes:
UPDATE STATISTICS PRICE_LIST_ITEMS
WITH FULLSCAN;
Data Archival: Your 8 million record table with only 2 million active prices needs cleanup. Implement a monthly archival process:
- Archive price records older than 2 years to PRICE_LIST_ITEMS_HISTORY table
- Keep 2 years of history in the main table for audit and comparison purposes
- Partition the main table by effective_date year if your database supports it
Create an archival job in System Scheduler to run on the first of each month. This will keep your active table lean and maintain fast query performance as data grows.
Query Modification: Update the pricing module query to be more selective:
SELECT item_id, price_amount, currency_code,
effective_date, expiry_date
FROM PRICE_LIST_ITEMS
WHERE customer_id = 'C12345'
AND effective_date <= CURRENT_DATE
AND (expiry_date IS NULL OR expiry_date >= CURRENT_DATE)
Adding the expiry_date filter and removing SELECT * will leverage your new covering index perfectly. This query should execute in under 1 second even with millions of records.
After implementing these changes, monitor query performance for a week. You should see consistent sub-2-second response times for price list loads. If specific customer queries still run slowly, use database query profiling to identify if there are unusual data patterns (like customers with 10,000+ price records) that need additional optimization.
This draft is based on general Infor CloudSuite knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.