Hi guys,
Please help me with this because I have tried some things and they did not work.
SELECT *
FROM cont_cust
WHERE ACCOUNT_NO = 12 OR
ACCOUNT_NO IN
(SELECT ACCOUT_NO FROM cont_cust WHERE name like 'GUGU%')
The table_cust table has indexes on account_no and name. I was expecting this sql to find the accounts that have the name like 'GUGU' and concatenate the result with account equal to 12.
But it executes with a FILTER on a FULL TABLE scan.
My sql it is a bit more complex and I understand that this specific SQL can be rewritten to go on TABLE cast only once.
Do you have any idea? any SQL HINT?
Thanks