Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

More hints for getRange() on Oracle #2421

Merged
merged 2 commits into from
Oct 5, 2017
Merged

More hints for getRange() on Oracle #2421

merged 2 commits into from
Oct 5, 2017

Conversation

gbonik
Copy link
Contributor

@gbonik gbonik commented Oct 3, 2017

For some unknown reason, Oracle picks a very inefficient plan sometimes:

NESTED LOOPS
+-VIEW
| +-WINDOW NOSORT STOPKEY
| +-SORT GROUP BY NOSORT
| +-INDEX FULL SCAN
`- INDEX FAST FULL SCAN

Notice "FAST FULL SCAN" instead of "UNIQUE SCAN" or "RANGE SCAN".
Basically, Oracle decides to scan the whole index on every iteration
of the join loop, which is extremely slow.

We add more hints to discourage this behavior.

See PDS-56862

Priority (whenever / two weeks / yesterday):
High


This change is Reviewable

gbonik added 2 commits October 3, 2017 14:49
For some unknown reason, Oracle picks a very inefficient plan sometimes:

NESTED LOOPS
+-VIEW
| +-WINDOW NOSORT STOPKEY
|   +-SORT GROUP BY NOSORT
|     +-INDEX FULL SCAN
`- INDEX FAST FULL SCAN

Notice "FAST FULL SCAN" instead of "UNIQUE SCAN" or "RANGE SCAN".
Basically, Oracle decides to scan the whole index on every iteration
of the join loop, which is extremely slow.

We add more hints to discourage this behavior.
@gbonik gbonik requested review from dxiao and berler October 3, 2017 22:01
@codecov-io
Copy link

codecov-io commented Oct 4, 2017

Codecov Report

Merging #2421 into develop will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2421      +/-   ##
=============================================
+ Coverage      60.21%   60.26%   +0.04%     
- Complexity      4651     4652       +1     
=============================================
  Files            826      826              
  Lines          39052    39052              
  Branches        4014     4014              
=============================================
+ Hits           23517    23534      +17     
+ Misses         14058    14046      -12     
+ Partials        1477     1472       -5
Impacted Files Coverage Δ Complexity Δ
...sdb/keyvalue/dbkvs/impl/oracle/OracleGetRange.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...tion/impl/AbstractSerializableTransactionTest.java 85.75% <0%> (+0.54%) 34% <0%> (ø) ⬇️
.../java/com/palantir/util/debug/StackTraceUtils.java 52.46% <0%> (+1.34%) 22% <0%> (ø) ⬇️
...alantir/lock/client/LockRefreshingLockService.java 60.29% <0%> (+1.47%) 10% <0%> (ø) ⬇️
.../palantir/atlasdb/sweep/BackgroundSweeperImpl.java 81.98% <0%> (+2.7%) 18% <0%> (ø) ⬇️
...ain/java/com/palantir/paxos/PaxosProposerImpl.java 88.33% <0%> (+3.33%) 0% <0%> (ø) ⬇️
...ain/java/com/palantir/paxos/PaxosAcceptorImpl.java 76.78% <0%> (+7.14%) 0% <0%> (ø) ⬇️
...java/com/palantir/lock/impl/LockClientIndices.java 95% <0%> (+10%) 5% <0%> (ø) ⬇️

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 6254d4a...a68eb3c. Read the comment docs.

@gsheasby gsheasby merged commit 8c0ad27 into develop Oct 5, 2017
@gsheasby gsheasby deleted the oracle-ffs branch October 5, 2017 10:11
gbonik added a commit that referenced this pull request Oct 5, 2017
* More hints for getRange() on Oracle

For some unknown reason, Oracle picks a very inefficient plan sometimes:

NESTED LOOPS
+-VIEW
| +-WINDOW NOSORT STOPKEY
|   +-SORT GROUP BY NOSORT
|     +-INDEX FULL SCAN
`- INDEX FAST FULL SCAN

Notice "FAST FULL SCAN" instead of "UNIQUE SCAN" or "RANGE SCAN".
Basically, Oracle decides to scan the whole index on every iteration
of the join loop, which is extremely slow.

We add more hints to discourage this behavior.

* Release notes for #2421

(cherry picked from commit 8c0ad27)
gbonik added a commit that referenced this pull request Oct 5, 2017
* More hints for getRange() on Oracle

For some unknown reason, Oracle picks a very inefficient plan sometimes:

NESTED LOOPS
+-VIEW
| +-WINDOW NOSORT STOPKEY
|   +-SORT GROUP BY NOSORT
|     +-INDEX FULL SCAN
`- INDEX FAST FULL SCAN

Notice "FAST FULL SCAN" instead of "UNIQUE SCAN" or "RANGE SCAN".
Basically, Oracle decides to scan the whole index on every iteration
of the join loop, which is extremely slow.

We add more hints to discourage this behavior.

* Release notes for #2421

(cherry picked from commit 8c0ad27)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants