Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8B55D650150 for ; Sat, 23 Aug 2008 21:26:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43512-03 for ; Sat, 23 Aug 2008 21:25:54 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by postgresql.org (Postfix) with ESMTP id 319B865015A for ; Sat, 23 Aug 2008 21:25:55 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so1757458rvf.43 for ; Sat, 23 Aug 2008 17:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Dyd/wcL4Qm9/n+9rY1ewB9CvIeAbINnDtvOESIPPhhY=; b=ZHWcM+E2+kq7SftYp2kLqekkoeR5EHGv0iuXgLrHtHrjTO2E/fNsmgX78/dkAIJ/Ab 5UHSp77o6zpCY+CX+cLg81ks//ONyOBZej8wQgjleXTmrCkL0MaPLCjpJ5feUSoaEL8D DdZABsBrMOx1zbTJvqG3JR1EMrKQ3Joi8S7Ic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=pQyMv9rYCOT7mClT2gYiMevpgGKEL2Q+EZ1b/c2htINf+9u0yKVixEjjetWwCuUiW0 sq2e/uxDG+M9BmOI9oZOe/DxXHwNBeiL3QM1sb9scD/7E7ZpxxU4ZruPGRgZRgVP7yT0 8bYi/eGlaavCfAgbVur8cqetlK1bCl2LrZSwY= Received: by 10.141.44.13 with SMTP id w13mr1360296rvj.13.1219537552953; Sat, 23 Aug 2008 17:25:52 -0700 (PDT) Received: by 10.141.197.1 with HTTP; Sat, 23 Aug 2008 17:25:52 -0700 (PDT) Message-ID: Date: Sat, 23 Aug 2008 18:25:52 -0600 From: "Scott Marlowe" To: tls.wydd@free.fr Subject: Re: Large number of tables slow insert Cc: DiezelMax , pgsql-performance@postgresql.org In-Reply-To: <1219536553.48b0a6a9c6ea2@imp.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1775c5ea0808221841u746862e3h1b721ea82fdb7794@mail.gmail.com> <48AFE6BB.6040400@nts.biz.ua> <1219520134.48b0668645ce4@imp.free.fr> <1219536553.48b0a6a9c6ea2@imp.free.fr> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/297 X-Sequence-Number: 31178 On Sat, Aug 23, 2008 at 6:09 PM, wrote: > On this smaller test, the indexes are over the allowed memory size (I've got > over 400.000 readings per sensor) so they are mostly written in disk. They're always written to disk. Just sometimes they're not read. Note that the OS caches files as well as pgsql, and I'm not sure what you mean by "allowed memory size" but only the shared_buffers would hold onto something after it's been operated on. work_mem won't. > And on the > big test, I had small indexes (< page_size) because I only had about 5-10 rows > per table, thus it was 3000*8kb = 24mb which is lower than the allowed memory. > btw which is the conf parameter that contains the previously read indexes ? Not sure what you're asking. It's all automatic as far as OS and postgresql caching goes.