Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-24258] Rewrite optimization for oracle style partial range scan #3469

Merged
merged 28 commits into from
Jun 28, 2022

Conversation

shparkcubrid
Copy link
Contributor

@shparkcubrid shparkcubrid commented Apr 1, 2022

http://jira.cubrid.org/browse/CBRD-24258

Implementation
case1 : oracle style limit
Modify so that view merge is possible for cases that satisfy all of the conditions below.

  1. No join (only spec)
  2. Only rownum related predicate exists in where clause

If subquery has order by, change rownum to orderby_num.

TO_DO
UNION query: Since union query can not be view merged, need to add a new routine.

case2 : push limit
The limit clause of mainquery of union is pushed to subquery of union.
If the subquery of union has order_by or group_by, limit is changed to order_by_num or group_by_num. it is existing routines.

'limit 10,10' is changed to 'limit 10+10' and it is pushed to subquery.

Restriction

  • main query has order_by
  • union

NO_PUSH_PRED sql hint : don't push limit to subquery of union

@shparkcubrid shparkcubrid self-assigned this Apr 1, 2022
@codecov-commenter
Copy link

codecov-commenter commented Apr 1, 2022

Codecov Report

Merging #3469 (0407e9c) into develop (3453b6a) will decrease coverage by 5.14%.
The diff coverage is 63.36%.

❗ Current head 0407e9c differs from pull request most recent head f5b8be8. Consider uploading reports for the commit f5b8be8 to get more accurate results

@@             Coverage Diff             @@
##           develop    #3469      +/-   ##
===========================================
- Coverage    52.23%   47.09%   -5.15%     
===========================================
  Files          515      515              
  Lines       396065   396275     +210     
===========================================
- Hits        206890   186609   -20281     
- Misses      189175   209666   +20491     
Impacted Files Coverage Δ
src/broker/cas.c 41.55% <0.00%> (-1.57%) ⬇️
src/loaddb/load_sa_loader.cpp 0.00% <0.00%> (ø)
src/method/method_invoke.hpp 100.00% <ø> (ø)
src/method/query_method.cpp 0.00% <0.00%> (-11.82%) ⬇️
src/object/authenticate.c 46.24% <ø> (-7.60%) ⬇️
src/object/object_print.c 0.00% <0.00%> (-5.68%) ⬇️
src/parser/parse_tree.h 100.00% <ø> (ø)
src/parser/type_checking.c 66.59% <0.00%> (-12.46%) ⬇️
src/query/dblink_scan.c 0.00% <0.00%> (ø)
src/query/execute_statement.c 57.58% <0.00%> (-3.82%) ⬇️
... and 207 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3453b6a...f5b8be8. Read the comment docs.

Co-authored-by: Hyung-Gyu Ryoo <hgryoo@cubrid.com>
@shparkcubrid shparkcubrid merged commit 8e5f2aa into CUBRID:develop Jun 28, 2022
@shparkcubrid shparkcubrid deleted the CBRD-24258 branch June 28, 2022 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants