Použijte funkce okna:
select *
from (
select col1,
col2,
row_number() over (order by some_column) as rn,
count(*) over () as total_count
from the_table
)
where rn <= 4;
Ale pokud je ten stůl opravdu velký, nebude to moc rychlé.