Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 72DB16502EF for ; Thu, 11 Dec 2008 17:19:46 -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 82537-01 for ; Thu, 11 Dec 2008 17:19:39 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.156]) by mail.postgresql.org (Postfix) with ESMTP id 799356501CA for ; Thu, 11 Dec 2008 17:19:37 -0400 (AST) Received: by fg-out-1718.google.com with SMTP id 16so567471fgg.23 for ; Thu, 11 Dec 2008 13:19:35 -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:references; bh=FhkpWav5B7S35xvpU99saeuKB8xL3XOszsAwuC/QxCY=; b=Nc4VWU2WxxzjtTomYWp8L0t9g0Fclgj5Usj2/MpveyNITbvsUPsTMpr3egyr5h4RSf yotUBjiK7HNpwqgQULNLcEIx9mNtJPcIHXZjnXm1lB+tEUfLz7J4qQdNwVSYySu4l3HS RpvZG8jPbD88jh95vlxc8OTGjvAtYtydjbbzY= 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:references; b=Hh7yf9PknaiQsaE/TVvfiexjtk9bQkO6qdmCotsbCM/cFh2RDIfFpchRhEZF9BF3B3 CxgXVS0lxcOog1YiNj0pDaPo026bKG7n9zVeeCZfRIt/7tiCIj06IyUfG+v9mA0QWVka 9WaEt0m58eOmbuFEHSTVoJig3Ejiy4X2jvgGM= Received: by 10.86.4.2 with SMTP id 2mr1597437fgd.43.1229030375701; Thu, 11 Dec 2008 13:19:35 -0800 (PST) Received: by 10.86.1.8 with HTTP; Thu, 11 Dec 2008 13:19:35 -0800 (PST) Message-ID: <1d709ecc0812111319h6f99dec2kf9fb858ae6481a8a@mail.gmail.com> Date: Fri, 12 Dec 2008 00:19:35 +0300 From: "Vladimir Sitnikov" To: "Tom Lane" Subject: Re: benchmarking the query planner Cc: "Robert Haas" , "Gregory Stark" , "Kevin Grittner" , "jd@commandprompt.com" , "Josh Berkus" , "Greg Smith" , pgsql-hackers@postgresql.org In-Reply-To: <11006.1229029042@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_46149_1341946.1229030375688" References: <603c8f070812061019r5aca3aajeaa5493b11c5feff@mail.gmail.com> <9897C4AF-6D47-4F44-AD3D-F5A82AC392DB@enterprisedb.com> <87ljuq4rmk.fsf@oxford.xeocode.com> <603c8f070812092025k6325e0fcud001b205a507a634@mail.gmail.com> <4313.1228931932@sss.pgh.pa.us> <603c8f070812101828p1bd7df49yb8c916adedb49fe1@mail.gmail.com> <9565.1229018968@sss.pgh.pa.us> <603c8f070812111104xbfd86eaw8c0b64c4869c0e8@mail.gmail.com> <11006.1229029042@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200812/813 X-Sequence-Number: 129442 ------=_Part_46149_1341946.1229030375688 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > > There's something in what you say, but consider that we have pretty > much unanimous agreement that 10 is too small. I think we should > try to fix the problem, not just gradually ratchet up the value until > people start complaining in the other direction. (Also, we should have > plenty of opportunity during beta to find out if we went too far.) I am not sure if entity-attribute-value model could be used for postgres database, however that is one of the cases that require large MCV list (generally, for attribute column). You know, Oracle is not able to store more than 254 distinct values for histogram statistics. That really limits the use of histograms for software product the company I work for creates. One more direction could be implementing "MCV" for range of values (group values and interpolate in between). Consider statistics on timestamp column that says that for "2008-December" there are as many X rows, for "2008-November" as many as Y, etc. That could be used for rather accurate cardinality estimation of "between" cases, while keeping number of entries in "MCV" list small. Regards, Vladimir Sitnikov ------=_Part_46149_1341946.1229030375688 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline


There's something in what you say, but consider that we have pretty
much unanimous agreement that 10 is too small.  I think we should
try to fix the problem, not just gradually ratchet up the value until
people start complaining in the other direction.  (Also, we should have
plenty of opportunity during beta to find out if we went too far.)
I am not sure if entity-attribute-value model could be used for postgres database, however that is one of the cases that require large MCV list (generally, for attribute column).
 
You know, Oracle is not able to store more than 254 distinct values for histogram statistics. That really limits the use of histograms for software product the company I work for creates.

One more direction could be implementing "MCV" for range of values (group values and interpolate in between). Consider statistics on timestamp column that says that for "2008-December" there are as many X rows, for "2008-November" as many as Y, etc.  That could be used for rather accurate cardinality estimation of "between" cases, while keeping number of entries in "MCV" list small.


Regards,
Vladimir Sitnikov
------=_Part_46149_1341946.1229030375688--