Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5AE686321E7 for ; Tue, 3 Nov 2009 23:35:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 63878-06 for ; Wed, 4 Nov 2009 03:35:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f186.google.com (mail-iw0-f186.google.com [209.85.223.186]) by mail.postgresql.org (Postfix) with ESMTP id 891136335BC for ; Tue, 3 Nov 2009 23:35:21 -0400 (AST) Received: by iwn16 with SMTP id 16so4497298iwn.29 for ; Tue, 03 Nov 2009 19:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=rBVJXSTTlsjKC0Msa+5sieYCWjs+tjulvk/3WEKoyBQ=; b=wtwL0hN0HA21WQBbn5n0p+r6TnKBDlan6sRGwTNfjzFkbuprxnUGk24Ometykjnjp+ Ru/fSVksLqBTtfS4FQSC/S+ftr+evKjHxJtl0VSH2Vs5doUtXwMrcLoNjwdDbV8LfHUE XxStuEcyPSF8ViyCn2wyoFGCNaoerb7Zy2x0s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=kBu+faRDY5vsT7YkQ45MeEw4yz99i+Bi5XrSmV5LXlJw36US2NNf9LJPH76hWcVH87 dtUwOW4TF4qhVsMq6VnKVs62fUR7b/W8kHLB9IteszgaDkbCyd3E/pDkuFhOgJfzSTpg YDLp881Til148tvcDR/153VWkpRvfinj79rMQ= MIME-Version: 1.0 Received: by 10.231.5.23 with SMTP id 23mr2488765ibt.45.1257305719481; Tue, 03 Nov 2009 19:35:19 -0800 (PST) In-Reply-To: <60B0F2124D07B942988329B5B7CA393D01E5B93FF7@mail2.FireEye.com> References: <95652FF3B9EF3045AC4AE8FE5AF8671EED65CF6B@mail2.FireEye.com> <60B0F2124D07B942988329B5B7CA393D01E5B93FF7@mail2.FireEye.com> Date: Tue, 3 Nov 2009 20:35:19 -0700 Message-ID: Subject: Re: High Frequency Inserts to Postgres Database vs Writing to a File From: Scott Marlowe To: Jay Manni Cc: "pgsql-performance@postgresql.org" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.506 tagged_above=-10 required=5 tests=AWL=0.093, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/38 X-Sequence-Number: 36206 On Tue, Nov 3, 2009 at 8:12 PM, Jay Manni wrote: > Hi: > > > > I have an application wherein a process needs to read data from a stream = and > store the records for further analysis and reporting. The data in the str= eam > is in the form of variable length records with clearly defined fields =96= so > it can be stored in a database or in a file. The only caveat is that the > rate of records coming in the stream could be several 1000 records a seco= nd. > > > > The design choice I am faced with currently is whether to use a postgres > database or a flat file for this purpose. My application already maintain= s a A common approach is to store them in flat files, then insert the flat files at a later time so that if the db falls behind no data is lost.