Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 6215164FF13 for ; Fri, 12 Dec 2008 07:45:49 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 47595-08 for ; Fri, 12 Dec 2008 07:45:42 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f14.google.com (mail-bw0-f14.google.com [209.85.218.14]) by mail.postgresql.org (Postfix) with ESMTP id E600264FEFB for ; Fri, 12 Dec 2008 07:45:40 -0400 (AST) Received: by bwz7 with SMTP id 7so3169898bwz.19 for ; Fri, 12 Dec 2008 03:45:37 -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:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=7AB4PcuwyFJgxkZI/mVPVFlEyP+JtwAqqCMUO/Ftwug=; b=G+wQUsp7/hUY2U8VuT0McyGWt2Vpn6CZFWWVDO7L3bKbjcH4+qbw7RHYpb/y7/cFrd uD9knzyfGlJyh8FVbohp8gkz8wdmPECI8Q2Chu9Z6930GZDtAIxqzxTqXx9ld80gfyla VgwRqsd4g2c4d1sWOPAf7ADCZOHvg+YMDVwrY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=pIc7qfBtSs9h+86gTZ7/DRO+g2WyVZJTHuxzoYcoO2yHplc8KjNVdw38wj3HqyCMD6 1GDNwlhS8rRwE/ShnktvfIjuMqXZJdGldltMTAx/zXpnzJ68iJnVC41A2qH08stz8NEs MxbY8wtSd7WhiQP/OTb79AndNrG/VkxATQnjE= Received: by 10.223.106.142 with SMTP id x14mr4088648fao.23.1229082262036; Fri, 12 Dec 2008 03:44:22 -0800 (PST) Received: by 10.223.106.209 with HTTP; Fri, 12 Dec 2008 03:44:21 -0800 (PST) Message-ID: <603c8f070812120344m67ef2c1fs41806cfb4ff9e396@mail.gmail.com> Date: Fri, 12 Dec 2008 06:44:21 -0500 From: "Robert Haas" To: "Simon Riggs" Subject: Re: benchmarking the query planner Cc: "Greg Stark" , "Tom Lane" , "Kevin Grittner" , "jd@commandprompt.com" , "Josh Berkus" , "Greg Smith" , pgsql-hackers@postgresql.org In-Reply-To: <1229072675.13078.196.camel@hp_dx2400_1> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <603c8f070812061019r5aca3aajeaa5493b11c5feff@mail.gmail.com> <603c8f070812092025k6325e0fcud001b205a507a634@mail.gmail.com> <4313.1228931932@sss.pgh.pa.us> <603c8f070812101828p1bd7df49yb8c916adedb49fe1@mail.gmail.com> <9565.1229018968@sss.pgh.pa.us> <1229033073.13078.179.camel@hp_dx2400_1> <87ej0etkfh.fsf@oxford.xeocode.com> <1229039044.13078.193.camel@hp_dx2400_1> <4136ffa0812111823u645b6ec9wdca60b3da4b00499@mail.gmail.com> <1229072675.13078.196.camel@hp_dx2400_1> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/888 X-Sequence-Number: 129517 On Fri, Dec 12, 2008 at 4:04 AM, Simon Riggs wrote: >> The existing sampling mechanism is tied to solid statistics. It >> provides the correct sample size to get a consistent confidence range >> for range queries. This is the same mathematics which governs election >> polling and other surveys. The sample size you need to get +/- 5% 19 >> times out of 20 increases as the population increases, but not by very >> much. > > Sounds great, but its not true. The sample size is not linked to data > volume, so how can it possibly give a consistent confidence range? I'm not 100% sure how relevant it is to this case, but I think what Greg is referring to is: http://en.wikipedia.org/wiki/Margin_of_error#Effect_of_population_size It is a pretty well-known mathematical fact that for something like an opinion poll your margin of error does not depend on the size of the population but only on the size of your sample. ...Robert