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

Re: Optimizing a huge_table/tiny_table join

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: kynn(at)panix(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Optimizing a huge_table/tiny_table join
Date: 2006-05-25 01:31:56
Message-ID: 4475090C.6010303@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-performance
> 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/



In response to

pgsql-performance by date

Next:From: Tom LaneDate: 2006-05-25 01:41:59
Subject: Re: Optimizing a huge_table/tiny_table join
Previous:From: kynnDate: 2006-05-25 00:52:53
Subject: Optimizing a huge_table/tiny_table join

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