{"action":"created","issue":{"url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/205","labels_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/205/comments","events_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/205/events","html_url":"https://github.com/impossibl/pgjdbc-ng/issues/205","id":110567231,"number":205,"title":"Prepare-bind-execute-fetch is somewhat slow","user":{"login":"vlsi","id":213894,"avatar_url":"https://avatars.githubusercontent.com/u/213894?v=3","gravatar_id":"","url":"https://api.github.com/users/vlsi","html_url":"https://github.com/vlsi","followers_url":"https://api.github.com/users/vlsi/followers","following_url":"https://api.github.com/users/vlsi/following{/other_user}","gists_url":"https://api.github.com/users/vlsi/gists{/gist_id}","starred_url":"https://api.github.com/users/vlsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlsi/subscriptions","organizations_url":"https://api.github.com/users/vlsi/orgs","repos_url":"https://api.github.com/users/vlsi/repos","events_url":"https://api.github.com/users/vlsi/events{/privacy}","received_events_url":"https://api.github.com/users/vlsi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-09T00:28:36Z","updated_at":"2015-10-09T20:05:54Z","closed_at":null,"body":"I had a chance to benchmark pgjdbc-ng and it turns out it is two times slower than regular pgjdbc when processing resultset with 5 columns and 1, 50, 100 rows.\r\n\r\nThe details are here: https://github.com/pgjdbc/pgjdbc/pull/387\r\n\r\nI applied the following changes to pgjdbc benchmark module to run it against pgjdbc-ng:\r\n```\r\ndiff --git a/ubenchmark/pom.xml b/ubenchmark/pom.xml\r\nindex 4c60e51..212d51f 100644\r\n--- a/ubenchmark/pom.xml\r\n+++ b/ubenchmark/pom.xml\r\n@@ -60,6 +60,11 @@ POSSIBILITY OF SUCH DAMAGE.\r\n             <version>9.4-1201-jdbc41</version>\r\n             <scope>provided</scope>\r\n         </dependency>\r\n+        <dependency>\r\n+            <groupId>com.impossibl.pgjdbc-ng</groupId>\r\n+            <artifactId>pgjdbc-ng</artifactId>\r\n+            <version>0.6-SNAPSHOT</version>\r\n+        </dependency>\r\n     </dependencies>\r\n\r\n     <properties>\r\ndiff --git a/ubenchmark/src/main/java/org/postgresql/util/ConnectionUtil.java b/ubenchmark/src/main/java/org/postgresql/util/ConnectionUtil.java\r\nindex 6da2dd1..8647f61 100644\r\n--- a/ubenchmark/src/main/java/org/postgresql/util/ConnectionUtil.java\r\n+++ b/ubenchmark/src/main/java/org/postgresql/util/ConnectionUtil.java\r\n@@ -52,7 +52,7 @@ public class ConnectionUtil\r\n      */\r\n     public static String getURL()\r\n     {\r\n-        return \"jdbc:postgresql://\" + ConnectionUtil.getServer() + \":\" + ConnectionUtil.getPort() + \"/\" + ConnectionUtil\r\n+        return \"jdbc:pgsql://\" + ConnectionUtil.getServer() + \":\" + ConnectionUtil.getPort() + \"/\" + ConnectionUtil\r\n                 .getDatabase();\r\n     }\r\n\r\n@@ -64,9 +64,9 @@ public class ConnectionUtil\r\n     {\r\n         Properties properties = new Properties(System.getProperties());\r\n\r\n-        PGProperty.USER.set(properties, getUser());\r\n-        PGProperty.PASSWORD.set(properties, getPassword());\r\n-        PGProperty.PG_PORT.set(properties, getPort());\r\n+        properties.setProperty(\"user\", getUser());\r\n+        properties.setProperty(\"password\", getPassword());\r\n+        properties.setProperty(\"port\", Integer.toString(getPort()));\r\n         properties.setProperty(\"database\", getDatabase());\r\n         properties.setProperty(\"server\", getServer());\r\n```"},"comment":{"url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/comments/146974714","html_url":"https://github.com/impossibl/pgjdbc-ng/issues/205#issuecomment-146974714","issue_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/205","id":146974714,"user":{"login":"vlsi","id":213894,"avatar_url":"https://avatars.githubusercontent.com/u/213894?v=3","gravatar_id":"","url":"https://api.github.com/users/vlsi","html_url":"https://github.com/vlsi","followers_url":"https://api.github.com/users/vlsi/followers","following_url":"https://api.github.com/users/vlsi/following{/other_user}","gists_url":"https://api.github.com/users/vlsi/gists{/gist_id}","starred_url":"https://api.github.com/users/vlsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlsi/subscriptions","organizations_url":"https://api.github.com/users/vlsi/orgs","repos_url":"https://api.github.com/users/vlsi/repos","events_url":"https://api.github.com/users/vlsi/events{/privacy}","received_events_url":"https://api.github.com/users/vlsi/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T20:05:54Z","updated_at":"2015-10-09T20:05:54Z","body":"By the way, for 1000 rows:\r\n\r\npgjdbc-ng, prepare once\r\n```\r\nBenchmark                          (ncols)  (nrows)       (type)  Mode  Cnt     Score    Error  Units\r\nProcessResultSet.bindExecuteFetch        5     1000          INT  avgt   10   671,514 ±  6,132  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000       BIGINT  avgt   10  1822,205 ± 14,258  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000       STRING  avgt   10   904,521 ±  2,310  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000    TIMESTAMP  avgt   10  3140,054 ± 33,252  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000  TIMESTAMPTZ  avgt   10  2056,419 ± 30,540  us/op\r\n```\r\n\r\npgjdbc, prepare once\r\n```\r\nBenchmark                          (ncols)  (nrows)       (type)  Mode  Cnt     Score    Error  Units\r\nProcessResultSet.bindExecuteFetch        5     1000          INT  avgt   10   598,539 ±  2,757  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000       BIGINT  avgt   10  3152,642 ± 19,219  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000       STRING  avgt   10   775,261 ±  6,101  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000    TIMESTAMP  avgt   10  2741,300 ± 23,156  us/op\r\nProcessResultSet.bindExecuteFetch        5     1000  TIMESTAMPTZ  avgt   10   742,794 ±  4,866  us/op\r\n```"}}