|
Hi
We have an issue in Oracle which is causing it to take a long time to parse SQL. We are therefore trying to avoid using the normal ?variable? method of parameterising the SQL.
The Oracle guys have suggested using a stored procedure to return a cursor, which could then have proper parameters rather than
?substitution variables?. However, from what I can see it is only possible to read from the cursor that would be returned in an Oracle procedure or programming language, but the Data Source tab of TI only seems to allow a SELECT statement. Does anyone have a way around this?
I have two other alternatives:
1) Write the parameter values to a small table, and use joins to this to implement the selection (This is what I used to do
before ?var? came along.
2) Write a SQL FUNCTION that takes parameters, reads from a Cursor and Pipelines the results out, which then allows me to write SQL * FROM MyFunction. Pretty much at the limits of my Oracle knowledge but I have managed to get this working.
Are there any other ways around this?
Does anyone have any experience of doing this?
Does anyone have any views on which would be the best method?
The Cursor is likely to read in around 400 million rows and after a GROUP BY produce 1.5 million rows to be read into TM1.
Regards
Paul Simon |
|