Hi,
ive the below table with these sample entries. i want to split the CLASS_CODE string values based on the delimiter(,) and it works very well but the main problem the query is terribly slow even with filter as below,
STUDENT_TBL:
FK || CLASS_CODE ||.......
1 || X121_B, T521_A
2 || V4500_A
3 ||R709_H, Y7900, K900_Q
select DISTINCT STR FROM (
select regexp_substr(CLASS_CODE,'[^, ]+', 1, level) AS STR from STUDENT_TBL WHERE FK = 2
connect by regexp_substr(CLASS_CODE, '[^, ]+', 1, level) is not null
) Q ORDER BY 1
How can i tune this simple query or use alternative with better performance?
thank you.