Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9488F9FB482 for ; Thu, 12 Oct 2006 04:50:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 71595-09 for ; Thu, 12 Oct 2006 04:50:45 -0300 (ADT) X-Greylist: delayed 00:17:53.011832 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id D00F19FB483 for ; Thu, 12 Oct 2006 04:50:43 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from michael.eatserver.nl (michael.eatserver.nl [212.203.14.103]) by svr4.postgresql.org (Postfix) with ESMTP id 6D06A5AF8B7 for ; Thu, 12 Oct 2006 07:32:49 +0000 (GMT) Received: from dvipc (82-170-251-187.dsl.ip.tiscali.nl [82.170.251.187]) (authenticated bits=0) by michael.eatserver.nl (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id k9C7WlCP025989 for ; Thu, 12 Oct 2006 09:32:47 +0200 From: "H.J. Sanders" To: Subject: FW: Simple join optimized badly? Date: Thu, 12 Oct 2006 09:32:51 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Importance: Normal X-Virus-Scanned: by amavisd-new X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/229 X-Sequence-Number: 21358 Hello. Simply jumping on the bandwagon, just my 2 cents: why not just like in some other (commercial) databases: a statement to say: use index ............ I know this is against all though but if even the big ones can not resist the pressure of their users, why not? Henk Sanders > > -----Oorspronkelijk bericht----- > > Van: pgsql-performance-owner@postgresql.org > > [mailto:pgsql-performance-owner@postgresql.org]Namens Bucky Jordan > > Verzonden: woensdag 11 oktober 2006 16:27 > > Aan: Tom Lane; Brian Herlihy > > CC: Postgresql Performance > > Onderwerp: Re: [PERFORM] Simple join optimized badly? > > > > > > > Brian Herlihy writes: > > > > What would it take for hints to be added to postgres? > > > > > > A *whole lot* more thought and effort than has been expended on the > > > subject to date. > > > > > > Personally I have no use for the idea of "force the planner to do > > > exactly X given a query of exactly Y". You don't have exactly Y > > > today, tomorrow, and the day after (if you do, you don't need a > > > hint mechanism at all, you need a mysql-style query cache). > > > IMHO most of the planner mistakes we see that could be fixed via > > > hinting are really statistical estimation errors, and so the right > > > level to be fixing them at is hints about how to estimate the number > > > of rows produced for given conditions. Mind you that's still a plenty > > > hard problem, but you could at least hope that a hint of that form > > > would be useful for more than one query. > > > > > > > Do I understand correctly that you're suggesting it might not be a bad > > idea to allow users to provide statistics? > > > > Is this along the lines of "I'm loading a big table and touching every > > row of data, so I may as well collect some stats along the way" and "I > > know my data contains these statistical properties, but the analyzer > > wasn't able to figure that out (or maybe can't figure it out efficiently > > enough)"? > > > > While it seems like this would require more knowledge from the user > > (e.g. more about their data, how the planner works, and how it uses > > statistics) this would actually be helpful/required for those who really > > care about performance. I guess it's the difference between a tool > > advanced users can get long term benefit from, or a quick fix that will > > probably come back to bite you. I've been pleased with Postgres' > > thoughtful design; recently I've been doing some work with MySQL, and > > can't say I feel the same way. > > > > Also, I'm guessing this has already come up at some point, but what > > about allowing PG to do some stat collection during queries? If you're > > touching a lot of data (such as an import process) wouldn't it be more > > efficient (and perhaps more accurate) to collect stats then, rather than > > having to re-scan? It would be nice to be able to turn this on/off on a > > per query basis, seeing as it could have pretty negative impacts on OLTP > > performance... > > > > - Bucky > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 4: Have you searched our list archives? > > > > http://archives.postgresql.org > >