I have a vey huge query. It is rather large, so i will not post it here(it has 6 levels of nested queries with ordering and grouping). Query has 2 parameters that are passed to it via PreparedStatement.setString(index, value)
. When I execute my query through SQL Developer(replacing query parameters to actual values before it by hand) the query runs about 10 seconds and return approximately 15000
rows. But when I try to run it through java program using PreparedStament with varibales it fails with ORA-01652(unable to extend temp segment)
. I have tried to use simple Statement from java program - it works fine. Also when I use preparedStatement without variables(don't use setString()
, but specify parameters by hand) it works fine too.
So, I suspect that problem is in PreparedStatemnt parameters.
How does the mechanism of that parameters work? Why simple statement works fine but prepared one fails?