On 1 March 2012 13:02, Marcin Mirosław <marcin@mejor.pl> wrote:
W dniu 01.03.2012 12:50, Szymon Guz pisze: Hi Szymon,
> If you have only 2 rows in the table, then the plan really doesn't > matter too much. Sorting two rows would be really fast :) > > Try to check it with 10k rows.
It doesn't matter (in this case) how many records is in user_profile table. Planner does sorting. Here is version with more rows: $ explain (analyze,verbose,buffers) SELECT count(*) from (select * from