Subject Re: [IB-Java] Re: firebirdsql vs interclient speed
Author Herbert.Augustiny@sptroth.com
Hi Luca

The times I was talking about are from a select, I never finished a insert
of a big file with firebirdsql.

Your select speed is about 5 times slower with firebirdsql than with
interclient and from what I see it seems to get worse if you have less
bandwith + routers!!

If the time of 20 ms for an 8.5MB file insert is true, you must have at
least GBit Ethernet in your lan connection. If I calculate the wire
throughput (without overhead) I get 350 MBits/sec ??

What kind of network do you have?

Herbert



|---------+---------------------------->
| | "llafranc78" |
| | <luca.lafranchi@r|
| | ohag.ch> |
| | |
| | 07.02.2002 11:12 |
| | Please respond to|
| | IB-Java |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
| |
| To: IB-Java@yahoogroups.com |
| cc: |
| Subject: [IB-Java] Re: firebirdsql vs interclient speed |
>--------------------------------------------------------------------------------------------------------------------------------------------------|




Oh...I see that you are doing an update and I'm doing a query...
Well, let's make order :)

Note: the code is not exactly the real one, but this is how I get a
connection and make a query/insert.


QUERIES: select a row containing a 8578 Kb jpg picture

localhost -> interclient : 6099 ms
firebirdsql : 6429 ms

network -> interclient : 1045 ms
-> firebirdsql : 5565 ms

Sample code:

Connection conn = DriverManager.getConnection(....);//Usual URL,user
and password
Statement stmt = connection.createStatement();
long s = System.currentTimeMillis();
ResultSet rset = stmt.executeQuery("select pic_obj from pics where
id_ref=1");
Vector data = new Vector();
while(rset.next()){
data.addElement( rset.getBytes(1) );//The blob object
}
rset.close();
conn.commit();
long e = System.currentTimeMillis();
System.out.println("Needed time: "+(e-s));


INSERTS: inserting a 8578 Kb jpg image

localhost -> interclient 1342 ms
-> firebirdsql 1193 ms

network -> interclient 470 ms
-> firebirdsql 20(!!!!) ms

Sample code:

FileInputStream fis = new FileInputStream(picture);//picture is a
File object...

Connection conn = DriverManager.getConnection(...);
PreparedStatement pstmt = conn.prepareStatement("insert into pics
(id_ref,pic_obj) values (?,?)");

pstmt.setLong(1,2);
pstmt.setBinaryStream(2,fis,fis.available());

long s = System.currentTimeMillis();
pstmt.executeUpdate();
pstmt.close();
conn.commit();
long e = System.currentTimeMillis();
System.out.println("Time needed: "+(e-s));


I couldn't find any lack of performance in neither in interclient nor
in firebirdsql.
As you can see I don't use the Borland's components: I simply use the
JDBC api.

Ciao
Luca








To unsubscribe from this group, send an email to:
IB-Java-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/