@@ -0,0 +1,634 @@
+package org.davidmoten.rx.jdbc;%0A%0Apublic class MemoryUsageMain %7B%0A%0A    public static void main(String%5B%5D args) throws InterruptedException %7B%0A        Database db = Database.test(1);%0A        for (int i = 0; i %3C 1000; i += 1) %7B%0A            db.select(%22select count(*) from person%22).get(m -%3E %7B%0A                try %7B%0A                    Thread.sleep(1000000);%0A                %7D catch (InterruptedException e) %7B%0A                    e.printStackTrace();%0A                %7D%0A                return 1;%0A            %7D).forEach(System.out::println);%0A        %7D%0A        Thread.sleep(1000);%0A        System.gc();%0A        Thread.sleep(500000000L);%0A    %7D%0A%0A%7D%0A

add Main method to calculate heap usage of queued queries