Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D87A02E0084 for ; Wed, 11 Jun 2008 10:34:55 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 84757-08 for ; Wed, 11 Jun 2008 10:34:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id 519722E0065 for ; Wed, 11 Jun 2008 10:34:49 -0300 (ADT) Received: from perhan.alvh.no-ip.org (190-95-18-208.bk17-dsl.surnet.cl [190.95.18.208]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m5BDaHnp031541 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Jun 2008 06:36:20 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 613B347C7C; Wed, 11 Jun 2008 09:34:38 -0400 (CLT) Date: Wed, 11 Jun 2008 09:34:38 -0400 From: Alvaro Herrera To: Zoltan Boszormenyi Cc: PostgreSQL Performance , Hans-Juergen Schoenig Subject: Re: Scalability question Message-ID: <20080611133438.GD5352@alvh.no-ip.org> References: <484FA134.7030807@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <484FA134.7030807@cybertec.at> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 11 Jun 2008 06:36:21 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/47 X-Sequence-Number: 30397 Zoltan Boszormenyi wrote: > Hi, > > I got a question about scalability in high volume insert situation > where the table has a primary key and several non-unique indexes > on other columns of the table. How does PostgreSQL behave > in terms of scalability? The high volume of inserts comes from > multiple transactions. btree and gist indexes can have multiple concurrent insertions in flight. A potential for blocking is in UNIQUE indexes: if two transactions try to insert the same value in the unique index, the second one will block until the first transaction finishes. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.