SELECT
XYZ_ID
FROM XYZ
WHERE
SUBSTR(Processor_Key, 24, 5) = '01000' AND
SUBSTR(Processor_Key, 32, 5) = '00900' AND
SUBSTR(Processor_Key, 40, 5) = '00070' AND
SUBSTR(Processor_Key, 48, 5) = '10000' AND
SUBSTR(Processor_Key, 56, 5) = '66000' AND
SUBSTR(Processor_Key, 64, 5) = '09000' AND
SUBSTR(Processor_Key, 72, 5) = '00050';
如何優化查詢並降低查詢成本?如何使用SUBSTR優化查詢
擺脫substr。以不需要的方式存儲數據。或者處理應用程序代碼中的數據處理。否則,你幾乎卡住了。 – Strawberry
數據來自用戶,它可以是任何東西..應用程序數據處理不可能,我只在這裏添加了虛擬數據。 – user8413514