From: Joseph Shraibman <jks@selectacast.net>
To: Marcus Andree S. Magalhaes <marcus.magalhaes@vlinfo.com.br>
Subject: Re: optimizing large query with IN (...)
Date: Wed, 10 Mar 2004 19:41:45 -0500
Message-ID: <404FB5C9.3060803@selectacast.net> (raw)
In-Reply-To: <62371.200.174.148.100.1078889715.squirrel@webmail.webnow.com.br>
References: <62371.200.174.148.100.1078889715.squirrel@webmail.webnow.com.br>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jks@selectacast.net, marcus.magalhaes@vlinfo.com.br
Subject: Re: optimizing large query with IN (...)
In-Reply-To: <404FB5C9.3060803@selectacast.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox