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

[QUESTIONS] slow "select lo_unlink(..) where ...;" ?

From: "Park, Chul-Su" <pcs(at)mhlx01(dot)kek(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [QUESTIONS] slow "select lo_unlink(..) where ...;" ?
Date: 1998-07-16 15:48:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hi Hackers,

    When I record ~ 1000 records && blobs  and try to remove, it takes

create table PNT (
        id              int not null,   -- database record number
        exp             int not null,           -- experiment number
        run             int not null,           -- run
        run_to          int not null,           -- run to(valid range)
        version         int not null,           -- version number
        datatype        text default 'blob',    -- data type
        created         timestamp default current_timestamp,    --
creation time
        modified        timestamp default current_timestamp,    --
modification time
        owner           name default getpgusername(),   -- owner
        loid            oid default 0,          -- reference to pnt bank

constraint PNT_con check(run>0 AND run<=run_to AND version>0)

... and deposit ~ 1000 blobs(large objects with size ~ 10k), it takes ~
2 sec/record seems to be reonable.
But, deleting with

   result = PQexec(conn,
     "DECLARE pntcur CURSOR FOR "
     "SELECT count(lo_unlink(int4(oid_text(loid)))) "
     "FROM PNT"
   result = PQexec(conn, "FETCH 1 IN pntcur;");


    "DECLARE pntcur CURSOR FOR "
      "SELECT count(lo_unlink(int4(oid_text(loid)))) "
        "FROM PNT WHERE exp = %d"
    , exp);
   result = PQexec(conn, cmd);
   result = PQexec(conn, "FETCH 1 IN pntcur;");

takes forever!  "destroydb" also... something to do with inefficient

is there any plan to recall "simple unix file" based blobs?  I guess
that "inv" based blob seems to be
really inefficient... any comment?

best regards, cs

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-07-16 16:14:51
Subject: Re: [HACKERS] proposals for LLL, part 1
Previous:From: Bruce MomjianDate: 1998-07-16 15:33:35
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

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