You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by "Bulvik, Noam" <No...@teoco.com> on 2014/11/27 20:04:39 UTC

is there something like dual table in phoenix

HI,
We are using connection pool and there is a need to have a general SQL to test if connection is stil open.
In Oracle there is something like select * from dual;
In Impala you can use select 1 without table name

What can be used for phenix ? both are not valid

Regards,
Noam
Information in this e-mail and its attachments is confidential and privileged under the TEOCO confidentiality terms that can be reviewed here<http://www.teoco.com/email-disclaimer>.

RE: is there something like dual table in phoenix

Posted by De...@Dell.com.
If you are looking for as in-built like Oracle. You don't have it.

From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
Sent: Thursday, November 27, 2014 1:12 PM
To: user@phoenix.apache.org
Subject: RE: is there something like dual table in phoenix

Sure I can ,

I was looking for more elegant solution

From: Deepak_Gattala@Dell.com<ma...@Dell.com> [mailto:Deepak_Gattala@Dell.com]
Sent: Thursday, November 27, 2014 9:07 PM
To: user@phoenix.apache.org<ma...@phoenix.apache.org>
Subject: RE: is there something like dual table in phoenix

You can always create a table with one column in it and just insert one row.

And you can use as dual table all day long.

Thanks
Deepak Gattala

From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
Sent: Thursday, November 27, 2014 1:05 PM
To: user@phoenix.apache.org<ma...@phoenix.apache.org>
Subject: is there something like dual table in phoenix

HI,
We are using connection pool and there is a need to have a general SQL to test if connection is stil open.
In Oracle there is something like select * from dual;
In Impala you can use select 1 without table name

What can be used for phenix ? both are not valid

Regards,
Noam
Information in this e-mail and its attachments is confidential and privileged under the TEOCO confidentiality terms that can be reviewed here<http://www.teoco.com/email-disclaimer>.

Re: is there something like dual table in phoenix

Posted by James Taylor <ja...@apache.org>.
See also PHOENIX-922 which would be a more elegant way of selecting a
single row. It'd be great if someone could pick this one up.
Thanks,
James

On Thu, Nov 27, 2014 at 11:11 AM, Bulvik, Noam <No...@teoco.com> wrote:
> Sure I can ,
>
>
>
> I was looking for more elegant solution
>
>
>
> From: Deepak_Gattala@Dell.com [mailto:Deepak_Gattala@Dell.com]
> Sent: Thursday, November 27, 2014 9:07 PM
> To: user@phoenix.apache.org
> Subject: RE: is there something like dual table in phoenix
>
>
>
> You can always create a table with one column in it and just insert one row.
>
>
>
> And you can use as dual table all day long.
>
>
>
> Thanks
>
> Deepak Gattala
>
>
>
> From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
> Sent: Thursday, November 27, 2014 1:05 PM
> To: user@phoenix.apache.org
> Subject: is there something like dual table in phoenix
>
>
>
> HI,
>
> We are using connection pool and there is a need to have a general SQL to
> test if connection is stil open.
>
> In Oracle there is something like select * from dual;
>
> In Impala you can use select 1 without table name
>
>
>
> What can be used for phenix ? both are not valid
>
>
>
> Regards,
>
> Noam
>
> Information in this e-mail and its attachments is confidential and
> privileged under the TEOCO confidentiality terms that can be reviewed here.

RE: is there something like dual table in phoenix

Posted by "Bulvik, Noam" <No...@teoco.com>.
Sure I can ,

I was looking for more elegant solution

From: Deepak_Gattala@Dell.com [mailto:Deepak_Gattala@Dell.com]
Sent: Thursday, November 27, 2014 9:07 PM
To: user@phoenix.apache.org
Subject: RE: is there something like dual table in phoenix

You can always create a table with one column in it and just insert one row.

And you can use as dual table all day long.

Thanks
Deepak Gattala

From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
Sent: Thursday, November 27, 2014 1:05 PM
To: user@phoenix.apache.org<ma...@phoenix.apache.org>
Subject: is there something like dual table in phoenix

HI,
We are using connection pool and there is a need to have a general SQL to test if connection is stil open.
In Oracle there is something like select * from dual;
In Impala you can use select 1 without table name

What can be used for phenix ? both are not valid

Regards,
Noam
Information in this e-mail and its attachments is confidential and privileged under the TEOCO confidentiality terms that can be reviewed here<http://www.teoco.com/email-disclaimer>.

RE: is there something like dual table in phoenix

Posted by "Bulvik, Noam" <No...@teoco.com>.
We are using phoenix from weblogic j2ee server where standard data source is connection pool

-----Original Message-----
From: James Taylor [mailto:jamestaylor@apache.org]
Sent: Thursday, November 27, 2014 9:14 PM
To: user
Subject: Re: is there something like dual table in phoenix

Hi Noam,
The Phoenix JDBC driver is an embedded driver, so I wouldn't recommend using a connection pool. The underlying HConnection to the cluster is shared among all connections for the same client JVM, so creating new connection has almost zero overhead (we're just instantiating a few instances).

If you don't want to create your own DUAL table, you can always use the SYSTEM.CATALOG table (with a LIMIT 1 clause).

Thanks,
James

On Thu, Nov 27, 2014 at 11:07 AM,  <De...@dell.com> wrote:
> You can always create a table with one column in it and just insert one row.
>
>
>
> And you can use as dual table all day long.
>
>
>
> Thanks
>
> Deepak Gattala
>
>
>
> From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
> Sent: Thursday, November 27, 2014 1:05 PM
> To: user@phoenix.apache.org
> Subject: is there something like dual table in phoenix
>
>
>
> HI,
>
> We are using connection pool and there is a need to have a general SQL
> to test if connection is stil open.
>
> In Oracle there is something like select * from dual;
>
> In Impala you can use select 1 without table name
>
>
>
> What can be used for phenix ? both are not valid
>
>
>
> Regards,
>
> Noam
>
> Information in this e-mail and its attachments is confidential and
> privileged under the TEOCO confidentiality terms that can be reviewed here.
Information in this e-mail and its attachments is confidential and privileged under the TEOCO confidentiality terms that can be reviewed here<http://www.teoco.com/email-disclaimer>.

Re: is there something like dual table in phoenix

Posted by James Taylor <ja...@apache.org>.
Hi Noam,
The Phoenix JDBC driver is an embedded driver, so I wouldn't recommend
using a connection pool. The underlying HConnection to the cluster is
shared among all connections for the same client JVM, so creating new
connection has almost zero overhead (we're just instantiating a few
instances).

If you don't want to create your own DUAL table, you can always use
the SYSTEM.CATALOG table (with a LIMIT 1 clause).

Thanks,
James

On Thu, Nov 27, 2014 at 11:07 AM,  <De...@dell.com> wrote:
> You can always create a table with one column in it and just insert one row.
>
>
>
> And you can use as dual table all day long.
>
>
>
> Thanks
>
> Deepak Gattala
>
>
>
> From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
> Sent: Thursday, November 27, 2014 1:05 PM
> To: user@phoenix.apache.org
> Subject: is there something like dual table in phoenix
>
>
>
> HI,
>
> We are using connection pool and there is a need to have a general SQL to
> test if connection is stil open.
>
> In Oracle there is something like select * from dual;
>
> In Impala you can use select 1 without table name
>
>
>
> What can be used for phenix ? both are not valid
>
>
>
> Regards,
>
> Noam
>
> Information in this e-mail and its attachments is confidential and
> privileged under the TEOCO confidentiality terms that can be reviewed here.

RE: is there something like dual table in phoenix

Posted by De...@Dell.com.
You can always create a table with one column in it and just insert one row.

And you can use as dual table all day long.

Thanks
Deepak Gattala

From: Bulvik, Noam [mailto:Noam.Bulvik@teoco.com]
Sent: Thursday, November 27, 2014 1:05 PM
To: user@phoenix.apache.org
Subject: is there something like dual table in phoenix

HI,
We are using connection pool and there is a need to have a general SQL to test if connection is stil open.
In Oracle there is something like select * from dual;
In Impala you can use select 1 without table name

What can be used for phenix ? both are not valid

Regards,
Noam
Information in this e-mail and its attachments is confidential and privileged under the TEOCO confidentiality terms that can be reviewed here<http://www.teoco.com/email-disclaimer>.