Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 12E972E36DA for ; Fri, 30 Nov 2007 06:15:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 38784-09 for ; Fri, 30 Nov 2007 06:15:47 -0400 (AST) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.191]) by postgresql.org (Postfix) with ESMTP id B9C772E36C7 for ; Fri, 30 Nov 2007 06:15:46 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id l15so1902937rvb for ; Fri, 30 Nov 2007 02:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=09rujXwDebKnOkhawiyvLidy+fO8pG3XnYxB67zkay8=; b=iKo8p6/W5IzmzHRtNy1jhww9tFvAAqqLNvcauyapXirjLeMcCXrhMKIVzmAt3Y/JtwsUZdBFG6rnf+b+aSpZjWNBQe4CFZtOHaUgSJW0jgIPjL3PDikpz/vg1XQ1oOhTN88AiGyWEXRgU70IdkINPy6Kt9aXbqba3tmsWCytK1M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T08XdhFDY+9bZTDh3R30zJfP0gx3NFqEStdaI4sLBb7qpHmunZyVeMdUbhbJEnCCoSTpJbkb2vR/DuP4g5lkVIdA6+p2r0qnHStVW0+6zqf02BfSWlLIGjsvwHvZwQHjUnfCdKz/pqNe/WFIDiuvLMTAV2azSjXTzsQKvAVuzaY= Received: by 10.114.123.1 with SMTP id v1mr178713wac.1196417745251; Fri, 30 Nov 2007 02:15:45 -0800 (PST) Received: by 10.114.75.8 with HTTP; Fri, 30 Nov 2007 02:15:45 -0800 (PST) Message-ID: <90bce5730711300215x3ff6c68ekf1c55ce799e48578@mail.gmail.com> Date: Fri, 30 Nov 2007 02:15:45 -0800 From: "Trevor Talbot" To: pgsql-performance@postgresql.org Subject: Re: TB-sized databases In-Reply-To: <878x4hmfd4.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4544e0330711260904g45d893a8ub1731e245aa8fc84@mail.gmail.com> <474B1B8C.1030505@gmail.com> <4544e0330711271218h56ce4cc3p280a9fefff24583d@mail.gmail.com> <1196197045.4246.1154.camel@ebony.site> <474CA2FA.2020201@laotraesquina.com.ar> <20071128082716.91bbad9c.wmoran@collaborativefusion.com> <1196257702.31315.6.camel@PCD12478> <1196270576.4246.1246.camel@ebony.site> <878x4hmfd4.fsf@oxford.xeocode.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/394 X-Sequence-Number: 27809 On 11/29/07, Gregory Stark wrote: > "Simon Riggs" writes: > > On Wed, 2007-11-28 at 14:48 +0100, Csaba Nagy wrote: > >> In fact an even more useful option would be to ask the planner to throw > >> error if the expected cost exceeds a certain threshold... > > Tom's previous concerns were along the lines of "How would know what to > > set it to?", given that the planner costs are mostly arbitrary numbers. > Hm, that's only kind of true. > Obviously few people know how long such a page read takes but surely you would > just run a few sequential reads of large tables and set the limit to some > multiple of whatever you find. > > This isn't going to precise to the level of being able to avoid executing any > query which will take over 1000ms. But it is going to be able to catch > unconstrained cross joins or large sequential scans or such. Isn't that what statement_timeout is for? Since this is entirely based on estimates, using arbitrary fuzzy numbers for this seems fine to me; precision isn't really the goal.