Reading Large Oracle DBs via JDBC

From: gp (parcha_at_gmail.com)
Date: 01/17/05


Date: 16 Jan 2005 21:52:52 -0800

Hi,

I have to read large data(mostly CLOBs) from ORacle 9i DB via JDBC.

My code works fine with DB volume in the order of few MB. But as soon
as the DB volume increases to 1 GB it throws
an Memory Exception.
I connect using Oracle thin driver(oracle.jdbc.driver.OracleDriver)

1.The query is a simple 'select * from table'.
I can't refine the query further as I need the entire data for
processing.

2. I use java.sql.Statement and my statement.getFetchSize() returns 10

3. tmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY);
stmt.setFetchSize(Integer.MIN_VALUE);
stmt.setFetchSize(Integer.MIN_VALUE) throws an SQL Exception.

4. So should I have to modify the query to only get a certain number of
rows.
sql = "select * from table where dbms_rowid.rowid_row_number(rowid)
> >= "+startrec+" and dbms_rowid.rowid_row_number(rowid) <=
> "+endrec+;
> Resultset rs = stmnt.excutequerry(sql);
Any help would be grately appreciated.

Thanks,
gp



Relevant Pages

  • Oracle JDBC Problem mit OpenOffice
    ... Ich habe eine Oracle XE datenbank (Vs. ... JDBC ist auf meinem Laptop installiert. ... Aber ich kann die Tabellen nicht öffnen und keine Query absetzen:-(( ... Warum kann ich die Tabellen sehen aber nicht öffnen?. ...
    (de.comp.lang.java)
  • Bug in jdbc timestamp escaping in Oracle 9i?
    ... has anybody experienced this in Oracle: ... Issue a jdbc query using a timestamp like: ... I have reproduced the problem in Oracle 9.2.0.4 with JDBC ...
    (comp.lang.java.databases)
  • Re: Reading Large Oracle DBs via JDBC
    ... > I have to read large datafrom ORacle 9i DB via JDBC. ... > an Memory Exception. ... So should I have to modify the query to only get a certain number of ...
    (comp.lang.java.databases)
  • Re: Views - performance
    ... when u use stored object views oracle has to read the data dictionary ... this includes lots of steps for execution ... semantics of the query and fires it ... you'll possibly have any idea is to use explain plan to provide a base ...
    (comp.databases.oracle.server)
  • RE: DBI-1.48 bind_param_inout produces ORA-01461 colliding with a CLOB
    ... can pass strings as varchar's and have them inserted ... In theory I could write something to query the ... CLOB w/in Oracle is probably what is killing me... ...
    (perl.dbi.users)