Re: [HACKERS] Slow count(*) again...

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Maciek Sakrejda <msakrejda(at)truviso(dot)com>, "sthomas(at)peak6(dot)com" <sthomas(at)peak6(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: [HACKERS] Slow count(*) again...
Date: 2011-02-05 04:45:05
Message-ID: AANLkTik6rEiwi8+76=P__Pa9mwBAAKqMQxS=yx6Z=MSK@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Fri, Feb 4, 2011 at 5:17 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Mladen Gogala wrote:
>> characteristic of a religious community chastising a sinner. Let me
>> remind you again: all other major databases have that possibility:
>> Oracle, MySQL, DB2, SQL Server and Informix. Requiring burden of proof
>> about hints is equivalent to saying that all these databases are
>> developed by idiots and have a crappy optimizer.
>
> You need to state the case for hints independent of what other databases
> do, and indepdendent of fixing the problems where the optimizer doesn't
> match reatility.

And that kind of limits to an area where we would the ability to nudge
costs instead of just set them for an individual part of a query.
i.e. join b on (a.a=b.b set selectivity=0.01) or (a.a=b.b set
selectivity=1.0) or something like that. i.e. a.a and b.b have a lot
of matches or few, etc. If there's any thought of hinting it should
be something that a DBA, knowing his data model well, WILL know more
than the current planner because the planner can't get cross table
statistics yet.

But then, why not do something to allow cross table indexes and / or
statistics? To me that would go much further to helping fix the
issues where the current planner "flies blind".

--
To understand recursion, one must first understand recursion.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-02-05 04:47:11 Re: Linux filesystem performance and checkpoint sorting
Previous Message Bruce Momjian 2011-02-05 04:28:57 Re: compiler warning

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2011-02-05 04:54:24 Re: Talking about optimizer, my long dream
Previous Message Ken Cox 2011-02-05 03:38:04 Re: table partitioning and select max(id)