Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Sql > Re: Avoiding su...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3382 of 3799
Post > Topic >>

Re: Avoiding sub-query with group by

by a.cooke@[EMAIL PROTECTED] Apr 2, 2008 at 09:41 AM

Or maybe those scans are not nested and so it's O(n), not O(n^2)?

Sorry, I am not experienced using "explain".

Andrew

>                              QUERY PLAN
> ---------------------------------------------------------------------
>  Hash Join  (cost=1.16..2.27 rows=1 width=24)
>    Hash Cond: ((public.tbl.val = x.v) AND (public.tbl.rmp = x.mr))
>    ->  Seq Scan on tbl  (cost=0.00..1.06 rows=6 width=16)
>    ->  Hash  (cost=1.13..1.13 rows=2 width=8)
>          ->  HashAggregate  (cost=1.08..1.11 rows=2 width=8)
>                ->  Seq Scan on tbl  (cost=0.00..1.07 rows=2 width=8)
>                      Filter: (rmp > val)
 




 2 Posts in Topic:
Avoiding sub-query with group by
a.cooke@[EMAIL PROTECTED]  2008-04-02 09:39:27 
Re: Avoiding sub-query with group by
a.cooke@[EMAIL PROTECTED]  2008-04-02 09:41:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 22:07:24 CST 2008.