can oracle inline views be used across java statements instead of creating temporary table

StackOverflow https://stackoverflow.com/questions/2815057

  •  26-09-2019
  •  | 
  •  

문제

i have a java program executing 3 separate sqls with a same inline view - it takes about 20 minutes each time to build the inline view when the sqls are executed - is there a way to cache or reuse it ? - trying to avoid temporary table solution because it needs to be delegated to a plsql since the java program does not have rights to create schema objects. ps: oracle 10g

올바른 솔루션이 없습니다

다른 팁

Oracle will do its best to cache the result if you let it. But you can still have a temp table if you really want to, and it is fairly small. If you use a package you can create the temp table the first time it is called and use the cached data the other 2 times -- try out the package variables and see if that does what you want.

Oracle temp tables should not be created on the fly. Docs here. If you use a temporary table for this create it once and just use it in the procedure.

Another option may be a materialized view. Docs here. The materialized view would be either refreshed on demand or on a schedule.

With the information given it is not possible to tell you which would fit your situation better.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top