X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A7414D1B2E0 for ; Sun, 25 Jul 2004 23:17:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 10877-03 for ; Mon, 26 Jul 2004 02:16:32 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 41BEAD1B1B4 for ; Sun, 25 Jul 2004 23:16:27 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i6Q2GRqb063565 for ; Mon, 26 Jul 2004 02:16:27 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i6Q1mJVf059814 for pgsql-admin@postgresql.org; Mon, 26 Jul 2004 01:48:19 GMT From: Steve X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Utilizing multiple disks Date: Mon, 26 Jul 2004 11:46:22 +1000 Organization: Hub.Org Networking Services Lines: 55 Message-ID: References: <4102F8EF.7080504@bigfoot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en In-Reply-To: <4102F8EF.7080504@bigfoot.com> To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/318 X-Sequence-Number: 14386 Gaetano, Thanks for your reply. Gaetano Mendola wrote: > Are you performing queries using the like operator? If yes did you define > an index on it using the right operator class ? Yes I do use the like operator to perform queries on a few 'varchar' and 'text' fields. I have indexed almost every column in the table (because the client application allows complex searches on multiple columns and each column has an equal chance of being used in the 'WHERE' condition) > Are you performing queries on a calculated field ? If yes then you need > to construct a sort of materialized view. Hmm not sure what you mean by a calculated field. Since I'm not sure what it means, I'm probably not using it. I'm definitely not running any functions on columns to get an accumulated result back etc. > If you are on Linux did you mounted your data partition with the option > noatime ? Yes I'm on linux and am using the ext3 filesystem. I am just about to mount the data partition with the noatime option. Docos do say that the speed increases considerably. I'll give it a shot but I'm still very interested in utilizing the extra three SCSI disks I have at my disposal. > Usualy split your tables on multiple disk is the last optimization step, > are you sure did you already reach the bootleneck of your sistem ? Actually IO is currently the only bottleneck for my system. I was using a single drive and had optimized it as much as I could (used indexes, partitioned tables horizontally on old dates etc) but I thought it would help me on the long run if I could store the actualy physical 'table files' on separate disks (as the rule says: more spindles == parallel IO). My current database basically has quite a few tables, out of which only four are the 'largest'. Each table is completely independant (I don't have a relational database setup because I didn't need it in this case) and is accessed simultaneously by around 10 users at one time. Each table also has almost all of its columns indexed. some of these columns are of type 'varchar', 'text' or 'double'. I am aware that the 'text' fields are stored internally in a separate table. Does this complicate things? Is it as easy as moving the files (I don't know which ones though - please help me out here) to an independant drive and then creating symbolic links to it to the '/opt/postgresql/data/...' directory? How do I achieve this without losing any of the data. Database integrity is of utmost importance and so is speed. I know there are tradeoffs but I really do think that moving the data to a separate disk will help. Can you please tell me how to set this up? Thanks a lot! Steve