From user-return-3763-apmail-phoenix-user-archive=phoenix.apache.org@phoenix.apache.org Tue Sep 15 04:42:33 2015 Return-Path: X-Original-To: apmail-phoenix-user-archive@minotaur.apache.org Delivered-To: apmail-phoenix-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E858210AA8 for ; Tue, 15 Sep 2015 04:42:32 +0000 (UTC) Received: (qmail 43661 invoked by uid 500); 15 Sep 2015 04:42:10 -0000 Delivered-To: apmail-phoenix-user-archive@phoenix.apache.org Received: (qmail 43618 invoked by uid 500); 15 Sep 2015 04:42:10 -0000 Mailing-List: contact user-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@phoenix.apache.org Delivered-To: mailing list user@phoenix.apache.org Received: (qmail 43609 invoked by uid 99); 15 Sep 2015 04:42:10 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2015 04:42:10 +0000 Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 20F861A0181 for ; Tue, 15 Sep 2015 04:42:10 +0000 (UTC) Received: by iofb144 with SMTP id b144so190283075iof.1 for ; Mon, 14 Sep 2015 21:42:09 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.107.9.151 with SMTP id 23mr33743945ioj.170.1442292129353; Mon, 14 Sep 2015 21:42:09 -0700 (PDT) Received: by 10.36.26.135 with HTTP; Mon, 14 Sep 2015 21:42:09 -0700 (PDT) In-Reply-To: References: <106415409.64325.1442289958306.JavaMail.yahoo@mail.yahoo.com> <1166835594.43665.1442290423586.JavaMail.yahoo@mail.yahoo.com> Date: Mon, 14 Sep 2015 21:42:09 -0700 Message-ID: Subject: Re: Phoenix with PreparedStatement From: James Taylor To: user Cc: Sumit Nigam Content-Type: multipart/alternative; boundary=001a113f8e26085586051fc1ce38 --001a113f8e26085586051fc1ce38 Content-Type: text/plain; charset=UTF-8 Sumit, To add to what Samarth said, even now PreparedStatements help by saving the parsing cost. Soon, too, for UPDATE VALUES, we'll also avoid recompilation when using a PreparedStatement. I'd encourage you to use them. Thanks, James On Mon, Sep 14, 2015 at 9:32 PM, Samarth Jain wrote: > Hi Sumit, > > Phoenix doesn't cache query plans as of yet. Once we move over to Calcite > parser and optimizer (which is a work in progress), we will hopefully start > doing that which is when your suggested approach of using PreparedStatement > with bind params would be beneficial. > > - Samarth > > On Mon, Sep 14, 2015 at 9:13 PM, Sumit Nigam wrote: > >> Hello, >> >> I am using Phoenix 4.5 with Hbase 0.98.1. >> >> PreparedStatement is preferred in case of say Oracle, etc. to help with >> effective use of query plans (with bind params). Does it also have same >> guarantees with Phoenix or does the Phoenix query engine treat both >> Statement and Prepared statement equally and I can use any of these with >> similar performance characteristics? >> >> Thanks, >> Sumit >> >> >> > --001a113f8e26085586051fc1ce38 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sumit,
To add to what Samarth said, even now PreparedS= tatements help by saving the parsing cost. Soon, too, for UPDATE VALUES, we= 'll also avoid recompilation when using a PreparedStatement. I'd en= courage you to use them.
Thanks,
James

On Mon, Sep 14, 2015 a= t 9:32 PM, Samarth Jain <samarth@apache.org> wrote:
Hi Sumit,

Ph= oenix doesn't cache query plans as of yet. Once we move over to Calcite= parser and optimizer (which is a work in progress), we will hopefully star= t doing that which is when your suggested approach of using PreparedStateme= nt with bind params would be beneficial.

- Samarth

On Mon, Sep 14, 2015 at 9:13 PM, Sumit Nigam <= sumit_only@yahoo.com> wrote:

I am using Phoen= ix 4.5 with Hbase 0.98.1.=C2=A0

PreparedStatement is preferred in case of say Oracle, etc. to help wi= th effective use of query plans (with bind params). Does it also have same = guarantees with Phoenix or does the Phoenix query engine treat both Stateme= nt and Prepared statement equally and I can use any of these with similar p= erformance characteristics?

Thanks,
Sumit




--001a113f8e26085586051fc1ce38--