jdbc vs. odbc performance - Mailing list pgsql-interfaces

From Jose' Soares Da Silva
Subject jdbc vs. odbc performance
Date
Msg-id Pine.LNX.3.96.980429141042.567A-100000@proxy.bazzanese.com
Whole thread Raw
List pgsql-interfaces
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: Sbragion Denis
Date:
Subject: Re: [INTERFACES] Access'97 and ODBC
Next
From: "Jose' Soares Da Silva"
Date:
Subject: Re: [INTERFACES] Access'97 and ODBC