Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id B61FE185C94E for ; Sat, 14 Jul 2012 12:11:14 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Sq3zz-0000f6-5x for pgsql-performance@postgresql.org; Sat, 14 Jul 2012 15:11:14 +0000 Received: by pbbrp8 with SMTP id rp8so7279949pbb.19 for ; Sat, 14 Jul 2012 08:10:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=W0LXn0f0KKL+desL4KHGF8yWlHFek1s7gLMJWBU7iec=; b=IebRP09tYRuiOTraBdkizuL/pJx6wyJDZK4UDLLF9ZWFiQIFoxgsMWctk9Ts485z7u WJrDoq4B0ql2v114e/awmtI/tZwCqwTdwPQGjrkECkZWu+vZJ1wW30UkSsiWZMGj91mp /7izzL5n0r1rXUo4PNmn+0sUS64COQCVSwrPQceh4Oo585fm9YOj5bxW3EfmR0I9QKbd WZmINOwOGPjUlC3HOxjxeU2R99tpT0Z33tu7curhz76BkXvIngGSKPi9DXV42PPrzmsB NWPX4SVX1IquhFyLnoGLVr5qUg6L8+rxXSmR5s9cgimY87F8ATQUPfxdtpnUQgzCu8uq +Cqg== Received: by 10.68.138.169 with SMTP id qr9mr12136175pbb.27.1342278657981; Sat, 14 Jul 2012 08:10:57 -0700 (PDT) Received: from ayaki.localdomain (58-7-231-93.dyn.iinet.net.au. [58.7.231.93]) by mx.google.com with ESMTPS id of4sm8191705pbb.51.2012.07.14.08.10.55 (version=SSLv3 cipher=OTHER); Sat, 14 Jul 2012 08:10:57 -0700 (PDT) Message-ID: <50018BFC.1080701@ringerc.id.au> Date: Sat, 14 Jul 2012 23:10:52 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Robert Klemme CC: pgsql-performance Subject: Re: Any tool/script available which can be used to measure scalability of an application's database. References: <50013279.4090407@ringerc.id.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlSoTCOmFqCq3OOWjJWyF3TYud45a37WcWqAk8t+RRfpweeK3jn2tCac+42jOigC90Ddaah X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/189 X-Sequence-Number: 47370 On 07/14/2012 08:17 PM, Robert Klemme wrote: > On Sat, Jul 14, 2012 at 11:50 AM, B Sreejith wrote: >> Dear All, >> Thanks alot for all the invaluable comments. > Additionally to Craig's excellent advice to measurements there's > something else you can do: with the knowledge of the queries your > application fires against the database you can evaluate your schema > and index definitions. While there is no guarantee that your > application will scale well if all indexes are present Don't forget that sometimes it's better to DROP an index that isn't used much, or that only helps occasional queries that aren't time-sensitive. Every index has a cost to maintain - it slows down your inserts and updates and it competes for disk cache with things that might be more beneficial. > b) do not have indexes nor no indexes which > support the queries your application does against these tables which > will result in full table scans. A full table scan is not inherently a bad thing, even for a huge table. Sometimes you just need to examine every row, and the fastest way to do that is without a doubt a full table scan. Remember, a full table scan won't tend to push everything out of shared_buffers, so it can also avoid competition for cache. (If anyone ever wants concurrent scans badly enough to implement them, full table scans with effective_io_concurrency > 1 will become a *lot* faster for some types of query). -- Craig Ringer