Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 3E40F1337BD2 for ; Sun, 1 May 2011 20:30:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 51289-01 for ; Sun, 1 May 2011 23:29:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mail.postgresql.org (Postfix) with ESMTP id 87E431337BD0 for ; Sun, 1 May 2011 20:29:49 -0300 (ADT) Received: from [192.168.1.6] (mail.highperformancepostgresql.com [71.179.240.8]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0M0bmA-1Pw6xW3Sxi-00u711; Mon, 02 May 2011 01:29:49 +0200 Message-ID: <4DBDED43.4050303@2ndQuadrant.com> Date: Sun, 01 May 2011 19:31:15 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110307 Icedove/3.0.11 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: stored proc and inserting hundreds of thousands of rows References: <4DBC004C020000250003D099@gw.wicourts.gov> <4881277622113933088@unknownmsgid> <4DBC0D7C020000250003D09E@gw.wicourts.gov> <76A45DA2-2AC3-4F58-933B-D4DCD61B8DCE@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:C552QKqNZVWX/5SlKdBpfH0gh3yLg4ro4iOiSl+drE8 lD4dyLcFwt3vrzfzWgKmQE1czR9wapBAT+moq+AVrcRie5ftKd JCzVSCYalGqEmKrHDAIFIEaME8yjREY1ldukwAADzuDfqZvf0F JmKG+WSl1JULZoWMCVh8O+5TRjGAsMLNKiT72Z5mLSr8nZ8qh0 3bYymejllRetNCc2U64xkSRPxKi/NZdXDwx4z4+m4c= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201105/5 X-Sequence-Number: 43514 On 04/30/2011 09:00 PM, Samuel Gendler wrote: > Some kind of in-memory cache of doc/ad mappings which the ad server > interacts with will serve you in good stead and will be much easier to > scale horizontally than most relational db architectures lend > themselves to...Even something as simple as a process that pushes the > most recent doc/ad mappings into a memcache instance could be > sufficient - and you can scale your memcache across as many hosts as > is necessary to deliver the lookup latencies that you require no > matter how large the dataset. Many of the things I see people switching over to NoSQL key/value store solutions would be served equally well on the performance side by a memcache layer between the application and the database. If you can map the problem into key/value pairs for NoSQL, you can almost certainly do that using a layer above PostgreSQL instead. The main downside of that, what people seem to object to, is that it makes for two pieces of software that need to be maintained; the NoSQL solutions can do it with just one. If you have more complicated queries to run, too, the benefit to using a more complicated database should outweigh that extra complexity though. -- Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us "PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books