Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E35D2200B45 for ; Fri, 15 Jul 2016 20:02:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E1EB9160A61; Fri, 15 Jul 2016 18:02:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 37AC3160A57 for ; Fri, 15 Jul 2016 20:02:04 +0200 (CEST) Received: (qmail 62361 invoked by uid 500); 15 Jul 2016 18:02:03 -0000 Mailing-List: contact user-help@empire-db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@empire-db.apache.org Delivered-To: mailing list user@empire-db.apache.org Received: (qmail 62351 invoked by uid 99); 15 Jul 2016 18:02:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jul 2016 18:02:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5DC2DCAB81 for ; Fri, 15 Jul 2016 18:02:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id g_gce6opcsyV for ; Fri, 15 Jul 2016 18:02:01 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 080645FAEE for ; Fri, 15 Jul 2016 18:02:01 +0000 (UTC) Received: by mail-oi0-f43.google.com with SMTP id j185so167683242oih.0 for ; Fri, 15 Jul 2016 11:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=7DHrhUurYS1ihOGyyYP8jw7h7d++Lh1CEXucovE7Awo=; b=tZ8lcwAcss+ylSvtYvZWpBQGEtgaMUhKG6l04lm27h2dzzQmD9zMWqheVtC1y6RqXK khvuXMxvXZ/SI4O3HExpboB5BwiVxZlu1RcSBXin2qVr1284MTGTi8ox+yhNf8O190Fj TI3ZEM6b/nhg3BtCanaTyJ7MXlP191VMo+ZWSLqoR87ranc4/HOVvg4qjiJZ+lMHGv0B 9d4jGB93FKW1j7J3/wy4ZrDhf4CqiI0gKlpXBZOuVFnCUffmqSNlrzt9JmbnL0zZ+sQ5 YhiPm/kcaH7u8vwmxBLY4zWlXH+Rc+Gs8BEpOuqASN01EQBJGafmJ1s+kz3OzJeZaveI 2ZGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7DHrhUurYS1ihOGyyYP8jw7h7d++Lh1CEXucovE7Awo=; b=VhHOMu6YE7HqbN4cHh2n70ibEHlIIz55JDGg6iPxVujFAQA4FmmXXqSarWWHktT0uu 1bOje2u8fiWIP8QbozkTjCL2NhV1YpcYI6e2ck+BXju7LPaxhxHnzk4OZ93r/8FnDQpz Q/FUeAr8PByplIzqlze6AtFpmTVx6YVVpMLB8ErKPeYj5lPxfYx/9fxCik7FT9P0JNkQ aVn90fcVrszWSyX+pY6x2aD2U/Z5p95ErwSQ6GLEpLpRg0rNEu7ipAU7u83Xz7IzPMt+ usd492YIWc2Mr1uFhNbNYvfTAc9ofKs0MjsumVubI+Z2aFBNQASGm72Ogdo4z5Lsp8Rv 9CrQ== X-Gm-Message-State: ALyK8tLg3w08k8kLbwZZdQPqokYlHLnHL6MShZHM5LdtmKdJmuhwQIr4p2mfk+raRn9+Xh4gg20p3A0jNCZaxg== X-Received: by 10.157.14.129 with SMTP id 1mr13701218otj.191.1468605719483; Fri, 15 Jul 2016 11:01:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.84.143 with HTTP; Fri, 15 Jul 2016 11:01:58 -0700 (PDT) From: Daniel Weidele Date: Fri, 15 Jul 2016 14:01:58 -0400 Message-ID: Subject: Prepared Statements To: user@empire-db.apache.org Content-Type: multipart/alternative; boundary=001a113eccd0399c280537b06ae0 archived-at: Fri, 15 Jul 2016 18:02:05 -0000 --001a113eccd0399c280537b06ae0 Content-Type: text/plain; charset=UTF-8 Dear group, what is the use of the prepared statements mechanism when, as it appears to me, the prepared statement is recreated with every call of "db.executeInsert(cmd, conn);"? In particular DBDatabaseDriver.class:541 to DBDatabaseDriver.class:547 do not "reuse" any prepared statement, but a new prepared statement is requested from the connection. Am I using it correctly? DBCmdParam myParam = myCmd.addParam(...); for (String value : myValues) { myParam.setValue(value); db.executeInsert(myCmd, myConn); } Thanks for help, Daniel --001a113eccd0399c280537b06ae0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Dear group,

what is the u= se of the prepared statements mechanism when, as it appears to me, the prep= ared statement is recreated with every call of "db.executeInsert(cmd, = conn);"?

In particular DBDatabaseDriver.class:541 to DBDa= tabaseDriver.class:547 do not "reuse" any prepared statement, but= a new prepared statement is requested from the connection.

Am= I using it correctly?

DBCmdParam myParam =3D myCmd.addParam(...);for (String value : myValues)
{
=C2=A0myParam.setValue(value);
= =C2=A0db.executeInsert(myCmd, myConn);
}

Thanks for he= lp,
Daniel
--001a113eccd0399c280537b06ae0--