Re: PoC: Partial sort - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: PoC: Partial sort
Date
Msg-id 52B8EB24.7050201@proxel.se
Whole thread Raw
In response to Re: PoC: Partial sort  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: PoC: Partial sort
List pgsql-hackers
On 12/22/2013 04:38 PM, Alexander Korotkov wrote:
> postgres=# explain analyze select * from test order by v1, id limit 10;
>                                                                    QUERY
> PLAN
>
-----------------------------------------------------------------------------------------------------------------------------------------------
>   Limit  (cost=11441.77..11442.18 rows=10 width=12) (actual
> time=79.980..79.982 rows=10 loops=1)
>     ->  Partial sort  (cost=11441.77..53140.44 rows=1000000 width=12)
> (actual time=79.978..79.978 rows=10 loops=1)
>           Sort Key: v1, id
>           Presorted Key: v1
>           Sort Method: top-N heapsort  Memory: 25kB
>           ->  Index Scan using test_v1_idx on test  (cost=0.42..47038.83
> rows=1000000 width=12) (actual time=0.031..38.275 rows=100213 loops=1)
>   Total runtime: 81.786 ms
> (7 rows)

Have you thought about how do you plan to print which sort method and 
how much memory was used? Several different sort methods may have been 
use in the query. Should the largest amount of memory/disk be printed?

> However, work with joins needs more improvements.

That would be really nice to have, but the patch seems useful even 
without the improvements to joins.

-- 
Andreas Karlsson



pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: trailing comment ghost-timing
Next
From: David Johnston
Date:
Subject: Re: trailing comment ghost-timing