The Java program actually just executes "SELECT b FROM public.a" and keeps streaming more rows doing something with the content, also the execution plan for my query is fairly simple - actually it seems to be just a sequential scan (with both versions).
Could you include as an attachment a complete compilable java program? Including the imports, the main public class definition, etc.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.