On Wed, Nov 18, 2009 at 2:30 PM, Pavel Stehule <pavel.steh...@gmail.com> wrote:
> yes, and don't use 20%.
>
> select * from foo order by somecol limit (select (count(*)*0.2)::int from foo)
>
> Regards
> Pavel

Is this faster on a large table? Because (select (count(*)*20/100)) worked fine.

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

Reply via email to