Try with Oracle OCI drivers.

----- Original Message -----
From: "Savotchkin Egor" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Tuesday, October 23, 2001 11:05 PM
Subject: jdbc performance Orion vs. WL


> Hi all,
> decided to find out who is the fastest when working with DB using jdbc. I
wrote a simple servlet that does the following:
> 1) acquires connection from the App. Server's JNDI tree and selects 7000
records from an Oracle table.
> 2) acquires connection using DriverManager (OracleDriver) and selects 7000
records from the same table.
>
> The results are
> 1) WL ~4000 ms vs. Orion ~7000 ms
> 2) WL ~4000 ms vs. Orion ~6600 ms
>
> I agree that WL outperforms Orion because it is using its own DB Driver.
But why even standard OracleDriver on Orion is working ~3 sec slower than on
Weblogic 6.1?
>
> May be it is possible to tune Orion so that it could outperform WL when
using jdbc?
>
> Egor Savotchkin
>
> try {
>
>
System.out.println("********************************************************
> *");
> System.out.println("Init ctx ... ");
> start();
> Context ctx = new InitialContext();
> end();
> System.out.println("Getting DS ...");
> start();
> DataSource ds = (DataSource) ctx.lookup(JNDI_NAME);
> end();
> System.out.println("getting connection ...");
> start();
> Connection conn = ds.getConnection();
> end();
> System.out.println("Connection : " + conn.getClass());
> System.out.println("creating statement ...");
> start();
> Statement st = conn.createStatement();
> end();
> String query = "SELECT * from logs";
> DatabaseMetaData dbmd = conn.getMetaData();
> System.out.println("executing : " + query);
> start();
> ResultSet rs = st.executeQuery(query);
> end();
> System.out.println("ResultSet : " + rs.getClass());
> int i = 0;
> System.out.println("rs");
> start();
> while (rs.next()) {
> i++;
> }
> end();
> rs.close();
> st.close();
> conn.close();
> conn = null;
> System.out.println("i = " + i);
> System.out.println("--------------------------------");
>
> System.out.println("getting connection ...");
> start();
> Class.forName("oracle.jdbc.driver.OracleDriver");
> conn = DriverManager.getConnection(
> "url", "xxx", "xxx");
> end();
> System.out.println("Connection : " + conn.getClass());
> System.out.println("creating statement ...");
> start();
> st = conn.createStatement();
> end();
> System.out.println("executing query : " + query);
> start();
> rs = st.executeQuery(query);
> end();
> System.out.println("ResultSet : " + rs.getClass());
> i = 0;
> System.out.println("rs");
> start();
> while (rs.next()) {
> i++;
> }
> end();
> } catch (Exception ex) {
> System.out.println("Exception : " + ex);
> }
>
>
>
>

Reply via email to