Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TRmMp-0002MK-Og for pgsql-performance@postgresql.org; Fri, 26 Oct 2012 16:02:39 +0000 Received: from mailout-us.gmx.com ([74.208.5.67]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TRmMk-0000GT-GW for pgsql-performance@postgresql.org; Fri, 26 Oct 2012 16:02:39 +0000 Received: (qmail 1369 invoked by uid 0); 26 Oct 2012 15:30:06 -0000 Received: from 76.255.19.161 by rms-us006 with HTTP Cc: "Jeff Janes" ,pgsql-performance@postgresql.org Content-Type: text/plain; charset="utf-8" Date: Fri, 26 Oct 2012 11:30:05 -0400 From: "Kevin Grittner" Message-ID: <20121026153006.306910@gmx.com> MIME-Version: 1.0 Subject: Re: Query-Planer from 6seconds TO DAYS To: ktm@rice.edu,=?iso-8859-1?Q?=22B=F6ckler_Andreas=22?= X-Authenticated: #138763884 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: Kcn4cIcW3zOlOQ09LnwhaA5+IGRvbwCP X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/315 X-Sequence-Number: 48274 ktm@rice.edu wrote: > You have the sequential_page_cost = 1 which is better than or equal > to the random_page_cost in all of your examples. It sounds like you > need a sequential_page_cost of 5, 10, 20 or more. The goal should be to set the cost factors so that they model actual costs for you workload in your environment. In what cases have you seen the sequential scan of a large number of adjacent pages from disk take longer than randomly reading the same number of pages from disk? (I would love to see the bonnie++ number for that, if you have them.) -Kevin