Thread: horrible performance when trying to connect to PostgreSQL using ODBC

horrible performance when trying to connect to PostgreSQL using ODBC

From
Adrian Maier
Date:
Hello guys !

I am trying to connect to pgsql using ODBC from Visual Objects
(for the ones who don't know what is Visual Objects, it's an IDE
with its own object-oriented language made by Computer Associates.
VO's roots are related to Clipper. ).

The time it takes to get the list of the tables, and then to get the
data and display it way too long. It took more than 16 seconds to
connect, get 200 records and print them on the console.

I know for sure that it's not pgsql's fault: with a small c program
that uses libpq i got the same data instantaneously. Also, it looks
like it's not VO's fault (i know that there are people who used VO
against big databases). So, the problem must be related to the ODBC
(the pgsql driver or something else?).

Anyway, i've tried to open the same table from MSAccess, and the
performance was even worse. Just an example: for going from one record
to the next one it lasts about 4-5 seconds.

The machine is a Pentium2 266mhz (128mb) laptop running windows NT.

Today, I have tried to access pgsql from MSAccess at work.  It worked
very fast. I've used the same ODBC drivers,   but the machine is
faster (p4 2.4ghz), has more memory, and the OS is windows 2000.
But it is hard for me to believe that a Pentium2 machine with 128mb RAM
can't handle 200 records !

I begin to think that there is something fishy about the ODBC
support installed on the laptop (i have recently "inherited" the
laptop from someone else, and i haven't reinstalled the os ).

What do you guys think?   what could be done to make things go
faster?


I have also two more questions. After installing the pgsql odbc
drivers, there are 3 drivers that appear:
"PostgreSQL", "POstgreSQL legacy" and "PostgreSQL unicode".
What's the difference between "PostgreSQL" and "PostgreSQL lecacy"?
Are there any options of the odbc driver that could cause a
performance boost?

Thanks you,

Adrian Maier











Re: horrible performance when trying to connect to PostgreSQL using ODBC

From
Tom Lane
Date:
Adrian Maier <am@fx.ro> writes:
> I begin to think that there is something fishy about the ODBC
> support installed on the laptop (i have recently "inherited" the
> laptop from someone else, and i haven't reinstalled the os ).

You'd be better off asking these questions on pgsql-odbc.  I'm not sure
that any of the ODBC gurus read this list.

I believe that the ODBC driver has some incredibly extensive, and
expensive, debug-logging options.  I dunno if max logging would entirely
explain the slowdown you see, but definitely check what you have turned
on.

            regards, tom lane