You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Stan Campbell <st...@gmail.com> on 2014/03/13 21:27:12 UTC

PHX 4; mutable index strangeness

This is odd.. I think?

If I create a simple table like..

CREATE TABLE SITE_ACTIVITY_UPDATES (

  SITE_ID VARCHAR(255),
  UPDATED_AT  DATE

    CONSTRAINT PK PRIMARY KEY (SITE_ID)
) SALT_BUCKETS = 3;

If I do a test insert of...

UPSERT INTO SITE_ACTIVITY_UPDATES(SITE_ID, UPDATED_AT) VALUES
('ABC123',NULL);

Then the following select returns the row as expected.

However, if I add an index like this..

CREATE INDEX SITE_ACTIVITY_UPDATES_BY_CREATED_AT ON SITE_ACTIVITY_UPDATES
(UPDATED_AT) SALT_BUCKETS = 3;

Then the row is apparently not inserted at all?

Am I doing something incredibly silly?

-- Stan

Re: Phoenix realease 3

Posted by James Taylor <ja...@apache.org>.
We'll cut an RC and start the vote on Tuesday, March 18th.
Thanks,
James

On Thursday, March 13, 2014, Ankur5 C <an...@tcs.com> wrote:

> Hi,
>
> When we are expecting Phoenix release 3 ?
>
>
> Thanks and Regards,
> Ankur Chakraborty
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>

Phoenix realease 3

Posted by Ankur5 C <an...@tcs.com>.
Hi,

When we are expecting Phoenix release 3 ?


Thanks and Regards,
Ankur Chakraborty
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you



Re: PHX 4; mutable index strangeness

Posted by James Taylor <ja...@apache.org>.
Hi Stan,
Not positive it's related, but I just checked in a fix for
https://issues.apache.org/jira/browse/PHOENIX-127.

This worked for my on my local build (with this fix). Is this different
than what you're doing? Also, FWIW, if a table is salted, the index is by
default salted in the same way.

Thanks,
James

0: jdbc:phoenix:localhost> CREATE TABLE SITE_ACTIVITY_UPDATES (

. . . . . . . . . . . . .>

. . . . . . . . . . . . .>   SITE_ID VARCHAR(255),

. . . . . . . . . . . . .>   UPDATED_AT  DATE

. . . . . . . . . . . . .>

. . . . . . . . . . . . .>     CONSTRAINT PK PRIMARY KEY (SITE_ID)

. . . . . . . . . . . . .> ) SALT_BUCKETS = 3;

No rows affected (6.308 seconds)

0: jdbc:phoenix:localhost>

0: jdbc:phoenix:localhost> UPSERT INTO SITE_ACTIVITY_UPDATES(SITE_ID,
UPDATED_AT) VALUES ('ABC123',NULL);

1 row affected (0.015 seconds)

0: jdbc:phoenix:localhost> select * from site_activity_updates;

+------------+---------------------+

|  SITE_ID   |     UPDATED_AT      |

+------------+---------------------+

| ABC123     | null                |

+------------+---------------------+

1 row selected (0.048 seconds)

0: jdbc:phoenix:localhost> CREATE INDEX SITE_ACTIVITY_UPDATES_BY_CREATED_AT
ON SITE_ACTIVITY_UPDATES (UPDATED_AT) SALT_BUCKETS = 3;

1 row affected (6.253 seconds)

0: jdbc:phoenix:localhost>

0: jdbc:phoenix:localhost> select * from site_activity_updates;

+------------+---------------------+

|  SITE_ID   |     UPDATED_AT      |

+------------+---------------------+

| ABC123     | null                |

+------------+---------------------+

1 row selected (0.076 seconds)


On Thu, Mar 13, 2014 at 1:27 PM, Stan Campbell <st...@gmail.com>wrote:

> This is odd.. I think?
>
> If I create a simple table like..
>
> CREATE TABLE SITE_ACTIVITY_UPDATES (
>
>   SITE_ID VARCHAR(255),
>   UPDATED_AT  DATE
>
>     CONSTRAINT PK PRIMARY KEY (SITE_ID)
> ) SALT_BUCKETS = 3;
>
> If I do a test insert of...
>
> UPSERT INTO SITE_ACTIVITY_UPDATES(SITE_ID, UPDATED_AT) VALUES
> ('ABC123',NULL);
>
> Then the following select returns the row as expected.
>
> However, if I add an index like this..
>
> CREATE INDEX SITE_ACTIVITY_UPDATES_BY_CREATED_AT ON SITE_ACTIVITY_UPDATES
> (UPDATED_AT) SALT_BUCKETS = 3;
>
> Then the row is apparently not inserted at all?
>
> Am I doing something incredibly silly?
>
> -- Stan
>