Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 64AAA9FB2D1 for ; Thu, 28 Sep 2006 22:06:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 24757-06 for ; Thu, 28 Sep 2006 22:06:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 325A19FA5CE for ; Thu, 28 Sep 2006 22:06:16 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 911A056437; Thu, 28 Sep 2006 20:06:14 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Thu, 28 Sep 2006 20:06:13 -0500 Date: Thu, 28 Sep 2006 20:06:13 -0500 From: "Jim C. Nasby" To: tomcask o_o Cc: pgsql-sql@postgresql.org Subject: Re: files or DataBase Message-ID: <20060929010613.GR34238@nasby.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060929:tomcask@gmail.com::vK2pol6/Zn/Akp+c:00000000000000000000 0000000000000000000000002ftJ X-Hashcash: 1:20:060929:pgsql-sql@postgresql.org::w5s7taMtsM7c/514:0000000000000 0000000000000000000000007Qcz X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.053 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/173 X-Sequence-Number: 26384 On Fri, Sep 29, 2006 at 12:37:56AM +0200, tomcask o_o wrote: > Hi > > in advance, sorry for my english. > > in a Web server as is the best option? > > to accede to db to show the contents or to accede to static files modified > by scripts when the content of db has been modified. > > That the habitual thing is to work directly with db and to give back to the > results mounting the page then. > > But I believe that serious much more fast if they were directly the files > and on the other hand in the server of local way executed scripts whom the > changes of the files in a aux table verified, and published the files that > have undergone changes. > > that to both consider the yield of the server in the diferents scenes. > > Greetings and thanks. The more code that sits between you and the data, the longer it takes to get at the data. Filesystems try and minimize that code path so that you can get at your data as fast as possible. Databases on the other hand provide you with a rich query environment that makes it easy to filter, format and manipulate data. So... if you're just talking about spewing data out a pipe without having to process it, nothing will beat a filesystem. So if your web content almost never changes, you'll probably be better off with static files that are re-generated from the database as needed. If most of your page content is static, with a small amount that's dynamic, you might want to mix and match the two somehow. Here's what you don't want to do: have each page issueing 100 queries to the database. That's a great way to kill your performance and/or scaleability. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)