Search Postgresql Archives

Re: Oddball data distribution giving me planner headaches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- On Fri, 12/2/11, David Johnston <polobo@xxxxxxxxx> wrote:

> From: David Johnston <polobo@xxxxxxxxx>
> What kind of plan does the following give?
> 
> EXPLAIN ANALYZE
> SELECT *
> FROM customer_rel p
> JOIN customer c ON (p.parent_customer = c.customer_id)
> WHERE c.customer_type = 'DISTRIBUTOR'

Nearly identical output

"Nested Loop  (cost=0.00..29624.69 rows=931 width=97) (actual time=0.032..1330.208 rows=1025401 loops=1)"
"  ->  Seq Scan on customer c  (cost=0.00..25429.10 rows=136 width=71) (actual time=0.017..212.059 rows=68 loops=1)"
"        Filter: (customer_type = 'DISTRIBUTOR'::bpchar)"
"  ->  Index Scan using rel_parent on customer_rel p  (cost=0.00..30.76 rows=7 width=26) (actual time=0.006..7.732 rows=15079 loops=68)"
"        Index Cond: (parent_customer = c.customer_id)"
"Total runtime: 1544.281 ms"


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux