Re: optimizing large query with IN (...) - Mailing list pgsql-performance

From Joseph Shraibman
Subject Re: optimizing large query with IN (...)
Date
Msg-id 404FB5C9.3060803@selectacast.net
Whole thread Raw
In response to optimizing large query with IN (...)  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
List pgsql-performance
Marcus Andree S. Magalhaes wrote:
> Guys,
>
> I got a Java program to tune. It connects to a 7.4.1 postgresql server
> running Linux using JDBC.
>
> The program needs to update a counter on a somewhat large number of
> rows, about 1200 on a ~130k rows table. The query is something like
> the following:
>
> UPDATE table SET table.par = table.par + 1
> WHERE table.key IN ('value1', 'value2', ... , 'value1200' )
>

How often do you update this counter?  Each update requires adding a new
row to the table and invalidating the old one.  Then the old ones stick
around until the next vacuum.

pgsql-performance by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: rapid degradation after postmaster restart
Next
From: Joseph Shraibman
Date:
Subject: Re: Postgresql on SAN