Subject RE: [IB-Java] Re: client-java driver pretty slow
Author Paulo Gaspar
Still without understanding well both clients, it smells like a
network issue.

With Oracle I have been having similar time differences, with the
same driver, just depending on how I build the JDBC URL (a server
URL needs resolving and a server TCP/IP address does not), the
network configuration, etc. (Always using a local DB.)

High CPU time too is often associated with establishing a network
connection.

The only other thing I can remember that can put a lot of overhead
is sending superfluous/invalid query parameterization to the server.


But this are my very doubtful 2 cents - keep in mind that I am new
to IB, Interclient and the client-java driver.


Have fun,
Paulo Gaspar

> -----Original Message-----
> From: Luca Lafranchi [mailto:luca.lafranchi@...]
> Sent: Tuesday, November 27, 2001 10:01 AM
> To: IB-Java@yahoogroups.com
> Subject: [IB-Java] Re: client-java driver pretty slow
>
>
> > Could you provide a simple example (ideally a junit test) that
> demonstrates
> > the slowing down?
>
> OK, I've done some time measuring tests (coded directly in my
> application, without using junit, at the moment). The code is really
> simple:
>
> System.out.println(query);
> long ftime = System.currentTimeMillis();
> ResultSet resultSet = statement.executeQuery(query);
> long stime = System.currentTimeMillis();
> System.out.println("Query time: "+(stime-ftime));
>
> I measured first with the Firebird Interclient driver and then with
> the client-java. Here are only two examples.
>
> Table portfolio has 12 rows; mandant_id is a foreign key referencing
> mandant.id_ref (table mandant has 7 rows).
>
> "select * from portfolio where mandant_id= 1 order by nummer"
> ic : Query time: 10
> c-j: Query time: 320
>
>
>
>
> Table koeffizienten has 477 rows; objekt_id is a foreign key
> referencing objekte.id_ref (table objekte has 34 rows).
>
> "select koeffizient , bezeichnung , zusammenges , calculated , formel
> , wert , einheit , isAnalyseGew , id_ref from koeffizienten WHERE
> objekt_id = 5 order by sortierpos"
> ic : Query time: 10
> c-j: Query time: 3124
>
>
> This is only to show you the difference between the two drivers, but
> continuing to use the client-java, I've seen that "Query time" remains
> between 3000 and 4100 millisecs, even with small tables (with some
> exceptions when it falls down to 300-350).
> Could it be that the transaction's "start...end...commit" sequence
> (performed for each query) is taking to much time, and not the actual
> time needed to fetch the data?
>
> Note: while performing the queries, the javaw process uses 99% of CPU.
>
> Hope this is helpful :)
>
> 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/
>
>