(
SELECT Example_id
FROM Table.Example
WHERE TRANSLATE(LTRIM(PLCY_NBR, '0'), '-~', '') like'35243'
)
UNION
(
SELECT EXAMPLE
FROM TABLE.EXAMPLE
WHERE EXAMPLE.SRC_SYS_ID = 14
AND TRANSLATE(LTRIM(PLAN_NBR, '0'), '-~', '') like'34123'
);
I set the parameters:
Set random_page_cost = 1.0;
Set seq_page_cost = 1.0;
Even after creating a GIN index for like
, the planning time is reduced, but the execution time is the same. I need to optimise the query.
New contributor
rohini M is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1