pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Ben <midfield@gmail.com>
To: Marcin Mańk <marcin.mank@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kevin Grittner <kgrittn@ymail.com>
Cc: bricklen <bricklen@gmail.com>
Cc: pgsql-performance@postgresql.org list <pgsql-performance@postgresql.org>
Subject: Re: incorrect row estimates for primary key join
Date: Wed, 26 Jun 2013 20:48:16 -0700
Message-ID: <81857BFB-509B-45F5-A7CD-2716A3FFD46A@gmail.com> (raw )
In-Reply-To: <CAK61fk5pLO18DwtkCQaMNsrELLWxp=5g6r5RWr09RVG2M34tYA@mail.gmail.com >
References: <7D0DD8B1-D23C-4BBC-9AB2-20D81F0B4BB8@gmail.com >
<CAGrpgQ9=Oz5ZPgmP5JGfX_HHeHe1=z6m-JCMhhE=JautW7Xxtw@mail.gmail.com >
<9A75BF4B-0458-43E3-803B-E25BB1984A39@gmail.com >
<1372166429.65996.YahooMailNeo@web162901.mail.bf1.yahoo.com >
<D05BECA9-0015-4B27-B974-B825D35DE1D9@gmail.com >
<1372198395.32951.YahooMailNeo@web162904.mail.bf1.yahoo.com >
<19479.1372203377@sss.pgh.pa.us >
<FBA13180-4428-4384-B41D-A9D9A7096790@gmail.com >
<CAK61fk5pLO18DwtkCQaMNsrELLWxp=5g6r5RWr09RVG2M34tYA@mail.gmail.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On Jun 26, 2013, at 5:22 PM, Marcin Mańk wrote:
> On Wed, Jun 26, 2013 at 2:29 AM, Ben <midfield@gmail.com> wrote:
>
>> shouldn't an index scan definitely be fastest here? you don't need to touch the whole table or index. maybe there something i have misconfigured here?
>>
>
> How about you try increasing work_mem ? I think a hash join may be the
> best plan here, and it won't get chosen with low work_mem .
i will increase work_mem and experiment for the other queries, but the query which i was asking about in this particular question was looking up the single smallest key in the primary key index, which seems like it shouldn't need to touch more than one key, since it can just get the first one from an in-order index traversal. of course with my earlier bigtable/jointable join question increasing work_mem makes a lot of sense.
best regards, ben
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
view thread (11+ messages)
Message-ID: <81857BFB-509B-45F5-A7CD-2716A3FFD46A@gmail.com>
Permalink: ../81857BFB-509B-45F5-A7CD-2716A3FFD46A@gmail.com/
Also on: postgresql.org/message-id/81857BFB-509B-45F5-A7CD-2716A3FFD46A@gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: midfield@gmail.com, marcin.mank@gmail.com, tgl@sss.pgh.pa.us, kgrittn@ymail.com, bricklen@gmail.com
Subject: Re: incorrect row estimates for primary key join
In-Reply-To: <81857BFB-509B-45F5-A7CD-2716A3FFD46A@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox