[ 
https://issues.apache.org/jira/browse/PHOENIX-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14240630#comment-14240630
 ] 

yang ming commented on PHOENIX-1515:
------------------------------------

sqlline version 1.1.2
0: jdbc:phoenix:10.103.23.82> select * from YK.VIDEO_REGION where 
videoid=183705534 and date=to_date('20141203','yyyyMMdd') limit 2;
+------------+---------------------+------------+------------+------------+------------+------------+------------+
|  VIDEOID   |        DATE         |  PLATFORM  |   DEVICE   | PROVINCEID |   
CITYID   |     VV     |     TS     |
+------------+---------------------+------------+------------+------------+------------+------------+------------+
| 183705534  | 2014-12-03          | app        | computer   | 11         | 
110000     | 39         | 30925      |
| 183705534  | 2014-12-03          | app        | computer   | 12         | 
120000     | 20         | 6021       |
+------------+---------------------+------------+------------+------------+------------+------------+------------+
2 rows selected (9.083 seconds)

jstack:
"main" prio=10 tid=0x000000000c9f1000 nid=0x3263 waiting on condition 
[0x0000000041b2b000]
   java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x0000000785d24b40> (a 
org.apache.phoenix.job.JobManager$JobFutureTask)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
        at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:425)
        at java.util.concurrent.FutureTask.get(FutureTask.java:187)
        at 
org.apache.hadoop.hbase.client.HTable.coprocessorService(HTable.java:1554)
        at 
org.apache.hadoop.hbase.client.HTable.coprocessorService(HTable.java:1511)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:917)
        at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.getTable(ConnectionQueryServicesImpl.java:1161)
        at 
org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:348)
        at 
org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:307)
        at 
org.apache.phoenix.schema.MetaDataClient.updateCache(MetaDataClient.java:303)
        at 
org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(FromCompiler.java:299)
        at 
org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.<init>(FromCompiler.java:215)
        at 
org.apache.phoenix.compile.FromCompiler.getResolverForQuery(FromCompiler.java:159)
        at 
org.apache.phoenix.compile.QueryCompiler.compileSingleQuery(QueryCompiler.java:374)
        at 
org.apache.phoenix.compile.QueryCompiler.compile(QueryCompiler.java:139)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:311)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$ExecutableSelectStatement.compilePlan(PhoenixStatement.java:294)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:215)
        at 
org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:211)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:210)
        at 
org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1040)
        at sqlline.SqlLine$Commands.execute(SqlLine.java:3673)
        at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
        at sqlline.SqlLine.dispatch(SqlLine.java:821)
        at sqlline.SqlLine.begin(SqlLine.java:699)
        at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
        at sqlline.SqlLine.main(SqlLine.java:424)

> explain time is too long
> ------------------------
>
>                 Key: PHOENIX-1515
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1515
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.2
>            Reporter: yang ming
>
> There are two Phoenix tables:YK.VIDEO_SUMMARY_NEW,YK.VIDEO_REGION,primary key 
> contains videoid.
> Each table has about 60,000 million rows,before query likes the following 
> cost in millisecond,but now quering table YK.VIDEO_REGION cost nearly 
> 10s,table YK.VIDEO_SUMMARY_NEW still in millisecond.
> Also the explains have the same results,so what cause this problem?
> 0: jdbc:phoenix:10.103.23.82> select * from YK.VIDEO_SUMMARY_NEW where 
> videoid=183705534 and date=to_date('20141203','yyyyMMdd') limit 2;
> +------------+---------------------+------------+------------+-------------+------------+------------+------------+------------+------------+------------+------------+--------+
> |  VIDEOID   |        DATE         |  PLATFORM  |   DEVICE   | SYSTEMGROUP |  
>  SYSTEM   |     VV     |     TS     |     UP     |    DOWN    |  COMMENT   |  
>  FAVORI   |   FAVO |
> +------------+---------------------+------------+------------+-------------+------------+------------+------------+------------+------------+------------+------------+--------+
> | 183705534  | 2014-12-03          | app        | computer   | windows     | 
> windows    | 870        | 663450     | null       | null       | null       | 
> null       | null   |
> | 183705534  | 2014-12-03          | app        | mobile     | android     | 
> android    | 21639      | 9232508    | null       | null       | null       | 
> null       | null   |
> +------------+---------------------+------------+------------+-------------+------------+------------+------------+------------+------------+------------+------------+--------+
> {color:red}
> 2 rows selected (0.325 seconds)
> {color}
> 0: jdbc:phoenix:10.103.23.82> select * from YK.VIDEO_REGION where 
> videoid=183705534 and date=to_date('20141203','yyyyMMdd') limit 2;
> +------------+---------------------+------------+------------+------------+------------+------------+------------+
> |  VIDEOID   |        DATE         |  PLATFORM  |   DEVICE   | PROVINCEID |   
> CITYID   |     VV     |     TS     |
> +------------+---------------------+------------+------------+------------+------------+------------+------------+
> | 183705534  | 2014-12-03          | app        | computer   | 11         | 
> 110000     | 39         | 30925      |
> | 183705534  | 2014-12-03          | app        | computer   | 12         | 
> 120000     | 20         | 6021       |
> +------------+---------------------+------------+------------+------------+------------+------------+------------+
> {color:red}
> 2 rows selected (8.169 seconds)
> {color}
> 0: jdbc:phoenix:10.103.23.82> explain select * from YK.VIDEO_SUMMARY_NEW 
> where videoid=183705534 and date=to_date('20141203','yyyyMMdd') limit 2;
> +------------+
> |    PLAN    |
> +------------+
> | CLIENT PARALLEL 30-WAY RANGE SCAN OVER YK.VIDEO_SUMMARY_NEW 
> [0,183705534,'2014-12-03 00:00:00.000'] |
> |     SERVER FILTER BY PageFilter 2 |
> |     SERVER 2 ROW LIMIT |
> | CLIENT MERGE SORT |
> | CLIENT 2 ROW LIMIT |
> +------------+
> {color:red}
> 5 rows selected (0.056 seconds)
> {color}
> 0: jdbc:phoenix:10.103.23.82> explain select * from YK.VIDEO_REGION where 
> videoid=183705534 and date=to_date('20141203','yyyyMMdd') limit 2;
> +------------+
> |    PLAN    |
> +------------+
> | CLIENT PARALLEL 30-WAY RANGE SCAN OVER YK.VIDEO_REGION 
> [0,183705534,'2014-12-03 00:00:00.000'] |
> |     SERVER FILTER BY PageFilter 2 |
> |     SERVER 2 ROW LIMIT |
> | CLIENT MERGE SORT |
> | CLIENT 2 ROW LIMIT |
> +------------+
> {color:red}
> 5 rows selected (8.109 seconds)
> {color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to