> On Sept. 21, 2018, 12:04 a.m., denys kuzmenko wrote: > > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java > > Line 311 (original), 311 (patched) > > <https://reviews.apache.org/r/68767/diff/1/?file=2090314#file2090314line312> > > > > Is it a good idea to use PreparedStatement for this particular > > use-case? > > Prepared statement must be recompiled each time you call it with a > > different number of parameters. Aside from the added time from recompiling > > the prepared statement, other queries may be removed from the pool of > > available statements causing them to be recompiled again too.
Just to jump in, I think the benefits of using PreparedStatements everywhere outweigh the costs. - Andrew ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68767/#review208827 ----------------------------------------------------------- On Sept. 21, 2018, 3:21 p.m., Laszlo Pinter wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68767/ > ----------------------------------------------------------- > > (Updated Sept. 21, 2018, 3:21 p.m.) > > > Review request for hive, Alexander Kolbasov, Peter Vary, and Vihang > Karajgaonkar. > > > Repository: hive-git > > > Description > ------- > > HIVE-20551: Create PreparedStatement query dynamically when IN clause is used > > > Diffs > ----- > > > standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java > 571c789eddfd2b1a27c65c48bdc6dccfafaaf676 > > > Diff: https://reviews.apache.org/r/68767/diff/2/ > > > Testing > ------- > > > Thanks, > > Laszlo Pinter > >