Re: Bad performance with large objects - Mailing list pgsql-odbc

From tomas@nocrew.org (Tomas Skäre)
Subject Re: Bad performance with large objects
Date
Msg-id 80n0316nae.fsf@junk.nocrew.org
Whole thread Raw
In response to Bad performance with large objects  (tomas@nocrew.org (Tomas Skäre))
List pgsql-odbc
tomas@nocrew.org (Tomas Skäre) writes:

> I'm using psqlodbc (latest from CVS) together with PostgreSQL 7.4.3 in
> a project. In it, I have a table that uses large objects (type
> "lo"). Functions for lo was imported from the contrib/lo-script.
>
> The table looks like this:
>
>  timestamp | bigint            | not null
>  jobid     | bigint            | not null
>  objectid  | bigint            | not null
>  class     | integer           | not null
>  field     | character varying | not null
>  data      | lo                |

...

> So, why does it take so much longer from ODBC, than from psql (even if
> I pick out the bytea-data)? The program and postgresql both run on the
> same machine, so there is no network delay. I've measured that it's
> not my program that is slow, it's the ODBC calls.

An addition to this:

If I change the table from lo to bytea, the program is able to read
the data much much faster. But, psqlodbc doesn't seem to like bytea
when writing to the database, so it's only the fetching that works
with this.


Tomas

pgsql-odbc by date:

Previous
From: tomas@nocrew.org (Tomas Skäre)
Date:
Subject: Bad performance with large objects
Next
From: Jon Schewe
Date:
Subject: unixODBC drivers for PostgreSQL?