Re: jdbc performance Orion vs. WL

2001-10-24 Thread Kesav Kumar

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);
> }
>
>
>
>




RE: jdbc performance Orion vs. WL

2001-10-24 Thread Curt Smith

> Did you use the ejb-location (this is the best)? Also, did you use the
> latest 9i jdbc drivers from Oracle? You need to repeat the test with
> updating and inserting. Also, create several connections at once 
> to use the
> pooling feature.

ejb-location ??  I'm interested in what you're saying here?

re: your benchmarking; another poster also gave thoughts to configure
a connection pool, data-sources.xml, and set min connections to be
a reasonable number.

- To better stress the container vs just see DB performance or JDBC driver
memory thrashing on the result set performance, why not have a test
fixture that hit your servlet with 100 simultaneous requests.I think
this is where WLS will be much heavier.  WLS would also be at more of
a disadvantage in EJB, especially Entity, performance. 

I believe this test is more of a JDBC / DB performance measure and the
7 sec is due to the 8i thin driver.Lets see if anyone gives perf
comparisons between 9i thick vs thin??

Anybody have subjective comparison between 8i thick/thin  VS 
9i thick/thin drivers??   

How about useful new features in the 9i thick/thin drivers?

Thanks,

curt





RE: jdbc performance Orion vs. WL

2001-10-23 Thread The elephantwalker

Egor,

Did you use the ejb-location (this is the best)? Also, did you use the
latest 9i jdbc drivers from Oracle? You need to repeat the test with
updating and inserting. Also, create several connections at once to use the
pooling feature.

Drop the stuff about Metadata...not very useful or very real world...and
known to be slow.

I would also drop the i/o, not necessary for this type of test.

Regards,

the elephantwalker
www.elephantwalker.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Savotchkin Egor
Sent: Tuesday, October 23, 2001 11:05 PM
To: Orion-Interest
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);
}