While testing locally I have spotted some areas I would like to change for what could be significant performance improvements.
One of our use cases is bulk fetching many rows (10_000) by rowkey with 'select x where rowkey in (:ids)' statements. (The ids from an external source). When doing this 25% of the time is spent in: org.apache.phoenix.jdbc.PhoenixPreparedStatement.PhoenixPreparedStatement(PhoenixConnection, String) org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(String) I have worked round this temporarily by writing a PreparedStatementCache and copying fields using reflection. This is somewhat ugly and I would like to submit a pull request with caching of the CompilableStatement. Any preferences/ thoughts of how I should implement this? As a note after the PreparedStatementCache was put in I am still seeing 14% of the time in org.apache.phoenix.compile.QueryCompiler.compile() but this looks much harder to improve.