Gunakan fungsi jendela:
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;
Tapi jika meja itu sangat besar, itu tidak akan terlalu cepat.