You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Michael Young <yo...@gmail.com> on 2017/05/22 22:45:01 UTC
Row timestamp usage
I am using a DATE type column as one of the leading columns in my PK and I
am defining it as "ROW TIMESTAMP" to take advantage of the optimizations
mentioned here:https://phoenix.apache.org/rowtimestamp.html
Are there any disadvantages to using this feature? My PK has 20+ columns
(queries are done over date ranges so I am interested in any optimizations
which help such queries). The value is set on UPSERT to the daily value,
the hour/minutes aren't really needed for my use cases so I just use
midnight 00:00.000 (eg. 2017-01-01 00:00:00.000).
Once it's set, is there a way to alter the column type to be a regular DATE
type? Or would I need to recreate the table?
Just wondering out of curiosity in case there are instances where I should
not be using this feature.
Cheers,
-Michael
Re: Row timestamp usage
Posted by Michael Young <yo...@gmail.com>.
Sergey,
at this point I haven't noticed any issues with the CsvBulkLoadTool on my
version (HDP2.5 with phoenix-4.7.0.2.5.0.0-1245). I don't have any
secondary indexes, if that is what you are referring to.
If you know any potential side effects, I can look for them. I will check
JIRA as well.
Thanks for this information!
On Mon, May 22, 2017 at 4:41 PM, Sergey Soldatov <se...@gmail.com>
wrote:
> AFAIK depending on the version of Phoenix you are using, you may
> experience problems with MR bulk load or indexes. Possible some other 'side
> effects' - try to search JIRAs for 'ROW TIMESTAMP". There is no way to
> alter the column type except drop/create this column.
>
> Thanks,
> Sergey
>
>
> On Mon, May 22, 2017 at 3:45 PM, Michael Young <yo...@gmail.com>
> wrote:
>
>> I am using a DATE type column as one of the leading columns in my PK and
>> I am defining it as "ROW TIMESTAMP" to take advantage of the optimizations
>> mentioned here:https://phoenix.apache.org/rowtimestamp.html
>>
>> Are there any disadvantages to using this feature? My PK has 20+ columns
>> (queries are done over date ranges so I am interested in any optimizations
>> which help such queries). The value is set on UPSERT to the daily value,
>> the hour/minutes aren't really needed for my use cases so I just use
>> midnight 00:00.000 (eg. 2017-01-01 00:00:00.000).
>>
>> Once it's set, is there a way to alter the column type to be a regular
>> DATE type? Or would I need to recreate the table?
>>
>> Just wondering out of curiosity in case there are instances where I
>> should not be using this feature.
>>
>> Cheers,
>> -Michael
>>
>>
>
Re: Row timestamp usage
Posted by Sergey Soldatov <se...@gmail.com>.
AFAIK depending on the version of Phoenix you are using, you may experience
problems with MR bulk load or indexes. Possible some other 'side effects' -
try to search JIRAs for 'ROW TIMESTAMP". There is no way to alter the
column type except drop/create this column.
Thanks,
Sergey
On Mon, May 22, 2017 at 3:45 PM, Michael Young <yo...@gmail.com> wrote:
> I am using a DATE type column as one of the leading columns in my PK and I
> am defining it as "ROW TIMESTAMP" to take advantage of the optimizations
> mentioned here:https://phoenix.apache.org/rowtimestamp.html
>
> Are there any disadvantages to using this feature? My PK has 20+ columns
> (queries are done over date ranges so I am interested in any optimizations
> which help such queries). The value is set on UPSERT to the daily value,
> the hour/minutes aren't really needed for my use cases so I just use
> midnight 00:00.000 (eg. 2017-01-01 00:00:00.000).
>
> Once it's set, is there a way to alter the column type to be a regular
> DATE type? Or would I need to recreate the table?
>
> Just wondering out of curiosity in case there are instances where I should
> not be using this feature.
>
> Cheers,
> -Michael
>
>