You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/06/03 11:59:24 UTC

[GitHub] [incubator-shardingsphere] wbliubin opened a new issue #2491: Group by in SQL statements takes a long time , the index seems to be not working...

wbliubin opened a new issue #2491: Group by in SQL statements takes a long time ,the index seems to be not working...
URL: https://github.com/apache/incubator-shardingsphere/issues/2491
 
 
   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   4.0.0-RC1
   
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-JDBC 
   
   ### Expected behavior
   I have a sql , eg:
   `SELECT
   	  a.tid 
   FROM A  a Left join B b on  a.tid = b.tid
   WHERE a.user_id= 1234567890
   AND a.sid = 1234567890
   AND b.user_id= 1234567890
   AND b.sid = 1234567890
      GROUP BY  
   	 a.tid 
   ORDER BY
   	a.tid DESC
   limit 10`
   
   1. The execution time of the database client is only 0.004s,
   ![image](https://user-images.githubusercontent.com/3971394/58799726-9eaded80-8638-11e9-958e-cdfff9474e1e.png)
   
   ### Actual behavior
   2. But , in Sharding-JDBC project ,it takes 4s~9s !
   
   ### Reason analyze (If you can)
   3. this SQL takes 0.01s~0.1 to get rid of the "group by" inside ,I mean, the index seems to be not working...
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services