Search Postgresql Archives

Update takes longer than expected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux