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

Re: Bad performance with large objects

From: tomas(at)nocrew(dot)org (Tomas =?iso-8859-1?q?Sk=E4re?=)
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Bad performance with large objects
Date: 2004-06-18 12:52:41
Message-ID: 80n0316nae.fsf@junk.nocrew.org (view raw or flat)
Thread:
Lists: pgsql-odbc
tomas(at)nocrew(dot)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

In response to

pgsql-odbc by date

Next:From: Jon ScheweDate: 2004-06-18 14:06:55
Subject: unixODBC drivers for PostgreSQL?
Previous:From: Tomas =?iso-8859-1?q?Sk=E4re?=Date: 2004-06-18 11:00:43
Subject: Bad performance with large objects

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