Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 866465E060A for ; Tue, 31 Jan 2012 07:21:53 -0400 (AST) Received: from elizabeth.gransy.com ([89.187.132.199]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RsBma-0006iD-Ih for pgsql-performance@postgresql.org; Tue, 31 Jan 2012 11:21:53 +0000 Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id 2629715E42AE; Tue, 31 Jan 2012 12:21:38 +0100 (CET) Received: from 193.179.187.70 (proxying for unknown) (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Tue, 31 Jan 2012 12:21:38 +0100 Message-ID: <21d33cd6ba3c80ad896633820f6b27ed.squirrel@sq.gransy.com> In-Reply-To: <94613a40-9ed8-403f-b7ce-92cfd50b81d3@o20g2000yqh.googlegroups.com> References: <94613a40-9ed8-403f-b7ce-92cfd50b81d3@o20g2000yqh.googlegroups.com> Date: Tue, 31 Jan 2012 12:21:38 +0100 Subject: Re: How to improve insert speed with index on text column From: "Tomas Vondra" To: "Saurabh" Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 X-Priority: 3 (Normal) Importance: Normal Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201201/146 X-Sequence-Number: 46158 On 31 Leden 2012, 10:29, Saurabh wrote: > I changed the configuration in postgresql.conf. Following are the > changed parameters: > > shared_buffers =3D 1GB > maintenance_work_mem =3D 50MB > checkpoint_segments =3D 64 > wal_buffers =3D 5MB > autovacuum =3D off > > Insert the records in the database and got a very good performance it > is increased by 6 times. > > Can you please tell me the purpose of shared_buffer and > maintenance_work_mem parameter? Shared buffers is the cache maintained by PostgreSQL. All all the data that you read/write need to go through shared buffers. Maintenance_work_mem specifies how much memory can "maintenance tasks" (e.g. autovacuum, reindex, etc.) use. This is similar to work_mem for common queries (sorting, grouping, ...). Tomas