You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/06 02:29:57 UTC

[GitHub] [doris] englefly opened a new pull request, #10633: [enhancement] improve performance of week() and yearweek()

englefly opened a new pull request, #10633:
URL: https://github.com/apache/doris/pull/10633

   # Proposed changes
   ssb100,
   doris_scanner_thread_pool_thread_num=1
   sql: 
   select  count(LO_ORDERDATE)  
   FROM  lineorder  
   WHERE  
        week(LO_ORDERDATE)  =  6;
   
   week() improved from 19 sec to 15 sec 
   yearweek() improved from 18 sec to 14 sec
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] englefly commented on pull request #10633: [enhancement] improve performance of week() and yearweek()

Posted by GitBox <gi...@apache.org>.
englefly commented on PR #10633:
URL: https://github.com/apache/doris/pull/10633#issuecomment-1176975418

   > 1. I think it's a really bad idea to initialize a look-up table from an explicit-defined data file. Could we do this job in BE process initialization phase? (e.g. doris_main.cpp)
   A: using data file is better
   -  it save launch time, meanwhile we have a bigger BE binary (80kb)
   -  Since we do not need to add more source code to generate the table, saves maintain effort.
   
   > 2. Using two look-up table with same keys also need to be re-thinking. Maybe a look-up table with mapping a key to a pair of value is enough?
   A: the table dimension from high to low:mode->year->month->day  is better than that of year->month->day->mode, because former is more locality friendly.
   
   > 3. I noticed there still are much unused codes. It seems using in your developing phase. Before merging to mater, it should be removed.
   A: these codes are used to generate look-up table. As mention in comments, they are attached as comments to help us update the pre-calculated years. For example, if we want to pre-calculate year from 1970 to 2050.
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei merged pull request #10633: [enhancement] improve performance of week() and yearweek()

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #10633:
URL: https://github.com/apache/doris/pull/10633


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org