You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Gabriel Reid (JIRA)" <ji...@apache.org> on 2014/03/16 08:21:32 UTC
[jira] [Resolved] (PHOENIX-736) How to design the table?
[ https://issues.apache.org/jira/browse/PHOENIX-736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gabriel Reid resolved PHOENIX-736.
----------------------------------
Resolution: Fixed
Bulk resolve of closed issues imported from GitHub. This status was reached by first re-opening all closed imported issues and then resolving them in bulk.
> How to design the table?
> ------------------------
>
> Key: PHOENIX-736
> URL: https://issues.apache.org/jira/browse/PHOENIX-736
> Project: Phoenix
> Issue Type: Task
> Reporter: yang ming
>
> CREATE TABLE IF NOT EXISTS YK_VIDEO_STAT (
> DATE DATE NOT NULL,
> VIDEOID VARCHAR NOT NULL,
> DEVICE VARCHAR NOT NULL,
> VV BIGINT,
> TS BIGINT,
> COMMENT BIGINT,
> UP BIGINT,
> DOWN BIGINT,
> FAVOR BIGINT,
> QUOTE BIGINT
> CONSTRAINT PK PRIMARY KEY (DATE DESC, VIDEOID, DEVICE)
> ) VERSIONS=1,COMPRESSION='SNAPPY';
> this is the ddl of my table.there will have 15 million rows every day,so 3 month will
> be 1350 million. (videoid in (1~200 million interger,every day only 10 million distinct),device in ('phone','pad','pc','other'))
> Running a query similar to the following costs at least 40s,it is too long.Can anybody give me some suggestions if query at least in the 3 month range ?
> select date,videoid,device,sum(vv),sum(ts),sum(comment),sum(up),sum(down),sum(favor),sum(quote) from yk_video_stat where videoid=10034569 and date >= to_date('20130901','yyMMdd') and date<=to_date('20130910','yyMMdd')
--
This message was sent by Atlassian JIRA
(v6.2#6252)