Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 473E2650295 for ; Sat, 23 Aug 2008 21:18:03 -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 36118-09-2 for ; Sat, 23 Aug 2008 21:17:41 -0300 (ADT) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from wmproxy1-g27.free.fr (wmproxy1-g27.free.fr [212.27.42.91]) by postgresql.org (Postfix) with ESMTP id 4EC0A65018D for ; Sat, 23 Aug 2008 21:09:11 -0300 (ADT) Received: from imp2-g19.priv.proxad.net (imp2-g19.priv.proxad.net [172.20.243.44]) by wmproxy1-g27.free.fr (Postfix) with ESMTP id BE83E506; Sun, 24 Aug 2008 02:30:15 +0200 (CEST) Received: by imp2-g19.priv.proxad.net (Postfix, from userid 33) id 03F4AE97; Sun, 24 Aug 2008 02:09:13 +0200 (CEST) Received: from ([137.43.154.234]) by imp.free.fr (IMP) with HTTP for ; Sun, 24 Aug 2008 02:09:13 +0200 Message-ID: <1219536553.48b0a6a9c6ea2@imp.free.fr> Date: Sun, 24 Aug 2008 02:09:13 +0200 From: tls.wydd@free.fr To: Scott Marlowe Cc: DiezelMax , pgsql-performance@postgresql.org Subject: Re: Large number of tables slow insert References: <1775c5ea0808221841u746862e3h1b721ea82fdb7794@mail.gmail.com> <48AFE6BB.6040400@nts.biz.ua> <1219520134.48b0668645ce4@imp.free.fr> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 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/296 X-Sequence-Number: 31177 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. 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 ? I cannot do test this weekend because I do not have access to the machine but I will try on monday some tests. Thanks for your answers thought Selon Scott Marlowe : > On Sat, Aug 23, 2008 at 1:35 PM, wrote: > > Actually, I've got another test system with only few sensors (thus few > tables) > > and it's working well (<10ms insert) with all the indexes. > > I know it's slowing down my performance but I need them to interogate the > big > > tables (each one can reach millions rows with time) really fast. > > It's quite likely that on the smaller system the indexes all fit into > memory and only require writes, while on the bigger system they are > too large and have to be read from disk first, then written out. > > A useful solution is to remove most of the indexes on the main server, > and set up a slony slave with the extra indexes on it to handle the > reporting queries. > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance >