Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Which databases are the most used with Java Date: Tue, 15 Aug 2017 14:37:28 -0000 (UTC) Organization: A noiseless patient Spider Lines: 25 Message-ID: References: <87y3qovwjb.fsf@munus.decebal.nl> <87tw1bx2c9.fsf@munus.decebal.nl> <87a833wzcx.fsf@munus.decebal.nl> <87pobz9yv5.fsf@munus.decebal.nl> <87h8x9pfi8.fsf@munus.decebal.nl> <87inhpni1f.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 15 Aug 2017 14:37:28 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="56e792173dfa83fd3f89af287a843a15"; logging-data="3690"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+iJcAIerAbikvDF6AvoapbAME3bSuIDpo=" User-Agent: Pan/0.141 (Tarzan's Death; 168b179 git.gnome.org/pan2) Cancel-Lock: sha1:1enOIWRL+9ySJA7AAWTYBOvnbA0= Xref: csiph.com comp.lang.java.programmer:37237 On Tue, 15 Aug 2017 14:15:40 +0200, Cecil Westerhof wrote: > I agree wholeheartedly, but I have queries that are hard coded. For > example: > SELECT COUNT(*) as count FROM usedProverbs > > I do not think I should use a PreparedStatement there. > Fair enough. Whether PreparedStatement would help at all depends on the RDBMS and use frequency: even a simple query like that might benefit if its used everywhere and the RDBMS doesn't recreate the execution strategy each time its used. A case in point might be where you're using something like a soft dbk as a table's prime key but the RDBMS doesn't support either autoincrementing fields or sequence objects, so you have to increment the stored sdbk seed and then copy the incremented value. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |