jdbc vs. odbc performance

From: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>
To: interfaces postgres <pgsql-interfaces(at)PostgreSQL(dot)org>
Subject: jdbc vs. odbc performance
Date: 1998-04-29 14:31:23
Message-ID: Pine.LNX.3.96.980429141042.567A-100000@proxy.bazzanese.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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'

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 1998-04-29 14:50:28 Re: [HACKERS] Re: [INTERFACES] Revised proposal for libpq and FE/BE protocol changes
Previous Message Tom Lane 1998-04-29 14:28:14 Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes