Update takes longer than expected

From: Andy Chambers <achambers(at)mcna(dot)net>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Cc: IT Dev Department <itdevteam(at)mcna(dot)net>
Subject: Update takes longer than expected
Date: 2012-01-09 21:03:28
Message-ID: CAAfW55pD3k291Sk3D7jGt-dUjOroSZLgm73htLf=vt+XvAtRRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have an update that takes longer than expected and wondered if
there's an easy way to make it go faster.

It's pretty simple:-

create table session (
id serial primary key,
data text);

update session
set data = 'ipsum lorem...'
where id = 5;

The "ipsum lorem.." stuff is an encrypted session variable from a
rails app that does tend to get quite large

select avg(length(data)) from session
=> 31275

We're trying to migrate the app from mysql to pg and this is one of
the performance bottle-necks. Unfortunately it slows down every
request by about 5 seconds. MySQL (both MyISAM and InnoDB) does this
almost instantaneously.

Cheers,
Andy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2012-01-09 21:26:21 Re: Update takes longer than expected
Previous Message Oliver Jowett 2012-01-09 20:21:37 Re: [JDBC] Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues