Skip site navigation (1) Skip section navigation (2)

pgsql: Improve planner's choices about when to use hashing vs sorting

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve planner's choices about when to use hashing vs sorting
Date: 2010-02-10 03:38:35
Message-ID: 20100210033835.8C4A57541B9@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Improve planner's choices about when to use hashing vs sorting for DISTINCT.

The previous coding missed a bet by sometimes picking the "sorted" path
from query_planner even though hashing would be preferable.  To fix, we have
to be willing to make the choice sooner.  This contorts things a little bit,
but I thought of a factorization that makes it not too awful.

Modified Files:
--------------
    pgsql/src/backend/optimizer/plan:
        planner.c (r1.263 -> r1.264)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/planner.c?r1=1.263&r2=1.264)

pgsql-committers by date

Next:From: Fujii MasaoDate: 2010-02-10 05:05:55
Subject: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Previous:From: Tom LaneDate: 2010-02-09 21:43:30
Subject: pgsql: Fix up rickety handling of relation-truncation interlocks.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group