BS490 opened a new issue, #44353:
URL: https://github.com/apache/doris/issues/44353

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   2.0.8
   
   ### What's Wrong?
   
   create table sql:
   `CREATE TABLE  dws_mediago_bidder_dsp_multi_measures_hourly  (
      campaign_id  int(11) NULL,
      asset_id  int(11) NULL,
      ssp  int(11) NULL,
      ad_id  int(11) NULL,
      crid  varchar(50) NULL,
      domain  varchar(2000) NULL,
      ip_country  varchar(200) NULL,
      account_id  varchar(32) NULL,
      account_name  varchar(500) NULL,
      company_id  varchar(32) NULL,
      company_name  varchar(500) NULL,
      am_name  varchar(50) NULL,
      platform_type  varchar(10) NULL,
      account_category  varchar(100) NULL,
      company_region  varchar(20) NULL,
      charge_type  varchar(20) NULL,
      target_cpa  DECIMAL(15, 9) NULL,
      d_s  date NULL,
      h_s  int(11) NULL,
      ad_count  bigint(20) SUM NULL,
      all_req_num  bigint(20) SUM NULL,
      account_gross_click_cost  double SUM NULL,
      click  bigint(20) SUM NULL,
      click_cost  double SUM NULL,
      conversion  bigint(20) SUM NULL,
      cv  bigint(20) SUM NULL,
      imp  bigint(20) SUM NULL,
      imp_cost  double SUM NULL,
      vimp  bigint(20) SUM NULL,
      mcv  bigint(20) SUM NULL,
      flr_sum_fix  double SUM NULL,
      bid_price_sum  double SUM NULL,
      req_num  double SUM NULL,
      prctr  double SUM NULL,
      pclick  double SUM NULL,
      req_ad_num  bigint(20) SUM NULL
   ) ENGINE=OLAP
   AGGREGATE KEY( campaign_id ,  asset_id ,  ssp ,  ad_id ,  crid ,  domain ,  
ip_country ,  account_id ,  account_name ,  company_id ,  company_name ,  
am_name ,  platform_type ,  account_category ,  company_region ,  charge_type , 
 target_cpa ,  d_s ,  h_s )
   COMMENT 'OLAP'
   PARTITION BY RANGE( d_s ,  h_s )()
   DISTRIBUTED BY HASH( campaign_id ) BUCKETS 36
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 3",
   "bloom_filter_columns" = "ssp, domain",
   "is_being_synced" = "false",
   "storage_format" = "V2",
   "light_schema_change" = "true",
   "disable_auto_compaction" = "false",
   "enable_single_replica_compaction" = "false"
   );`
   
   first sql:
   
![image](https://github.com/user-attachments/assets/fae74342-a3f5-4a60-abbe-d56494c7faff)
   
   second sql:
   
![image](https://github.com/user-attachments/assets/0a1ca7a7-f942-400d-a671-8fef6b7ecb7d)
   
   you can see different select express leading to dozens of times performance 
difference
   
   first sql explain:
   
![image](https://github.com/user-attachments/assets/ea0f20d4-99fd-4895-9705-7c149d1265f1)
   
![image](https://github.com/user-attachments/assets/78e59053-644e-40f8-bece-4136de4158ea)
   
   second sql explain:
   
![image](https://github.com/user-attachments/assets/a8a85fdd-d413-48d0-b5d0-a95242edf885)
   
![image](https://github.com/user-attachments/assets/bd4f8974-f1e6-434e-8e07-3c71ce3c3013)
   
   difference:
   VOlapScanNode PREAGGREGATION of first sql is off, second sql is on
   
   ### What You Expected?
   
   1.why VOlapScanNode PREAGGREGATION of first sql is off?
   2.is VOlapScanNode PREAGGREGATION the key of performance diff?
   3.is there any way to solve it?
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to