pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joshua D. Drake <jd@commandprompt.com>
To: kynn@panix.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Optimizing a huge_table/tiny_table join
Date: Wed, 24 May 2006 18:31:56 -0700
Message-ID: <4475090C.6010303@commandprompt.com> (raw)
In-Reply-To: <200605250052.k4P0qrT11965@panix3.panix.com>
References: <200605250052.k4P0qrT11965@panix3.panix.com>


> kj
> 
> PS:  FWIW, the query plan for the query with LIMIT 6000 is this:

What is the explain analyze?

> 
>                                      QUERY PLAN
> -------------------------------------------------------------------------------------
>  Limit  (cost=19676.75..21327.99 rows=6000 width=84)
>    ->  Hash Join  (cost=19676.75..1062244.81 rows=3788315 width=84)
>          Hash Cond: (upper(("outer".id)::text) = upper(("inner".id)::text))
>          ->  Seq Scan on huge_table h  (cost=0.00..51292.43 rows=2525543 width=46)
>          ->  Hash  (cost=19676.00..19676.00 rows=300 width=38)
>                ->  Seq Scan on tiny_table t  (cost=0.00..19676.00 rows=300 width=38)
> 
> ------------=_1148485808-20617-3--
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 


-- 

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/





view thread (12+ messages)  latest in thread

Message-ID: <4475090C.6010303@commandprompt.com>
Permalink:  ../4475090C.6010303@commandprompt.com/
Also on:    postgresql.org/message-id/4475090C.6010303@commandprompt.com

 · 

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: jd@commandprompt.com, kynn@panix.com
  Subject: Re: Optimizing a huge_table/tiny_table join
  In-Reply-To: <4475090C.6010303@commandprompt.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