PostgreSQL and Java: Best Practices
summary
Shows concrete outcomes and code: a GitHub repo with runnable examples, a psql-via-stdin trick that achieves 12,000 tables per second, comparison of drivers including the standard JDBC driver and PPG JDBC Next Generation (Netty based, binary mode), concrete JDBC fixes (no Class.forName on Java 6+, prefer try-with-resources, use prepared statements and server-side prepare threshold = 5), notes on COPY performance, SWIG JNI option, and recommends MyBatis and Juke for safer, more powerful DB access.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:27PostgreSQL and Java fit
- 8:27Connecting to PostgreSQL
- 18:48JDBC basics
- 24:04Fixing JDBC mistakes
- 33:16Prepared statements
- 40:27JDBC connection tips
- 43:54Model-View-Controller pattern in Java
- 45:00Java 8 database access
- 48:33JDBC SSL pitfalls
- 49:15Frameworks beyond JDBC
related talks
44mPostgres for Java Developers
01h 05mHigh-Performance JDBC
49m3+ Features Developers Use That Might Never Make It to PostgreSQL
46mThe State of Java Relational Persistence
46mUse PostgreSQL to Step Up Your Game
52mBulk data processing and PostgreSQL thingy
51mHow Postgres is Different (read BETTER than) your database
47mPostgreSQL worst practices
