RE: [INTERFACES] jdbc vs. odbc performance - Mailing list pgsql-interfaces

From Peter Mount
Subject RE: [INTERFACES] jdbc vs. odbc performance
Date
Msg-id 714F8949628ED1119E0F0060082C52F50951D2@vesta.maidstone.gov.uk
Whole thread Raw
List pgsql-interfaces
The differences is that the PostgreSQL JDBC driver is 100% java (we can't
use the logo because it costs ~ US$1,000), while the JDBC:ODBC bridge uses
native code (aka Machine Code).

Also, the ODBC driver doesn't work for Java Applets (AFAIK), but ours does.

Although our driver is slower, it is more stable, and supports some of the
PostgreSQL specific items (like FastPath, Geometric Types), and because it's
a type 4 driver, you don't have to recompile it to run on another platform.

--
Peter T Mount, peter@maidstone.gov.uk, peter@retep.org.uk
Please note that this is from my works email. If you reply, please cc my
home address.


-----Original Message-----
From: owner-pgsql-interfaces@hub.org
[mailto:owner-pgsql-interfaces@hub.org]On Behalf Of Jose' Soares Da
Silva
Sent: Wednesday, April 29, 1998 3:31 PM
To: interfaces postgres
Subject: [INTERFACES] jdbc vs. odbc performance


Hello, all

I have a performance problem. I tried the below java program to connect
with PostgreSQL.
I have a table with 8k rows and if I do a "SELECT * FROM mytable" using
JDBC it takes 50 secs of time to get all rows, using JDBC:ODBC bridge
it takes only 15 secs.
I thought JDBC was faster than ODBC.
Am I doing something wrong ?
Please help me.

I am using:
            o Linux 2.0.31
            o jdk 1.1.5
            o PostgreSQL 6.3
            o PSQLODBC.DLL 6.3 (postdrv.exe) Insight Distribution System

---------------------------------------------------------------------------
public void createConnectionDialog() {
//using JDBC:
        userNameLabel = new JLabel("User name: ", JLabel.RIGHT);
     userNameField = new JTextField("postgres");
    passwordLabel = new JLabel("Password: ", JLabel.RIGHT);
    passwordField = new JTextField("");
        serverLabel   = new JLabel("Database URL: ", JLabel.RIGHT);
    serverField   = new JTextField("jdbc:postgresql://verde/java");
    driverLabel   = new JLabel("Driver: ", JLabel.RIGHT);
    driverField   = new JTextField("postgresql.Driver");

//using ODBC:
    userNameLabel = new JLabel("User name: ", JLabel.RIGHT);
     userNameField = new JTextField("postgres");
    passwordLabel = new JLabel("Password: ", JLabel.RIGHT);
    passwordField = new JTextField("");
        serverLabel   = new JLabel("Database URL: ", JLabel.RIGHT);
    serverField   = new JTextField("jdbc:odbc:Sfera");
    driverLabel   = new JLabel("Driver: ", JLabel.RIGHT);
    driverField   = new JTextField("sun.jdbc.odbc.JdbcOdbcDriver");
---------------------------------------------------------------------------
                                                       Jose'


pgsql-interfaces by date:

Previous
From: "Jose' Soares Da Silva"
Date:
Subject: Re: [INTERFACES] Access'97 and ODBC
Next
From: Byron Nikolaidis
Date:
Subject: Re: [INTERFACES] Access'97 and ODBC