This GitHub repo contains example code for reading a JDBC source using JdbcIO in parallel.
With this example code you can read JDBC source without getting out of memory issues with Apache Beam/Dataflow.
See my blog here https://nl.devoteam.com/en/blog-post/querying-jdbc-database-parallel-google-dataflow-apache-beam/ for an in depth explanation of the code.