Skip site navigation (1) Skip section navigation (2)

RE: [INTERFACES] jdbc vs. odbc performance

From: Peter Mount <peter(at)maidstone(dot)gov(dot)uk>
To: "'Jose' Soares Da Silva'" <sferac(at)bo(dot)nettuno(dot)it>, "'interfaces postgres'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: RE: [INTERFACES] jdbc vs. odbc performance
Date: 1998-04-29 13:50:01
Message-ID: 714F8949628ED1119E0F0060082C52F50951D2@vesta.maidstone.gov.uk (view raw or flat)
Thread:
Lists: 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(at)maidstone(dot)gov(dot)uk, peter(at)retep(dot)org(dot)uk
Please note that this is from my works email. If you reply, please cc my
home address.


-----Original Message-----
From: owner-pgsql-interfaces(at)hub(dot)org
[mailto:owner-pgsql-interfaces(at)hub(dot)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

Next:From: Thomas G. LockhartDate: 1998-04-29 13:59:29
Subject: Re: [INTERFACES] Access'97 and ODBC
Previous:From: Byron NikolaidisDate: 1998-04-29 13:31:25
Subject: Re: [INTERFACES] Access'97 and ODBC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group