does sequence of columns in where condition matters the sequence of composite key? in Oracle DatabaseUsing a...
Do recommendation systems necessarily use machine learning algorithms?
How to fix the Unknown Command error caused by starting CmdInit.cmd using TCC/LE?
Accountant/ lawyer will not return my call
Motivation for Zeta Function of an Algebraic Variety
Are babies of evil humanoid species inherently evil?
Why does liquid water form when we exhale on a mirror?
Does "variables should live in the smallest scope as possible" include the case "variables should not exist if possible"?
Signed and unsigned numbers
Counting all the hearts
UART pins to unpowered MCU?
An alternative proof of an application of Hahn-Banach
Reversed Sudoku
What's the "normal" opposite of flautando?
Intuition behind counterexample of Euler's sum of powers conjecture
Why the color red for the Republican Party
Was Luke Skywalker the leader of the Rebel forces on Hoth?
Do items de-spawn in Diablo?
Do f-stop and exposure time perfectly cancel?
How to draw cubes in a 3 dimensional plane
Why does the negative sign arise in this thermodynamic relation?
Can one live in the U.S. and not use a credit card?
Aliens englobed the Solar System: will we notice?
What Happens when Passenger Refuses to Fly Boeing 737 Max?
What are the threaded holes in Manfrotto camera brackets?
does sequence of columns in where condition matters the sequence of composite key? in Oracle Database
Using a sequence created in the same script in OracleInstead of static list, using a table select result for IN keyHow to set the sequence to the last used id for all tables in Oracle?Duplicate data in a table given table nameUpsert - Should I verify the row exists first, attempt an update, or try to insert first?Update multiple Ids when SET = (Sql Query)Speeding up insert in SQL ServerEnsuring that Oracle sequence does not violate Java Integer constraintsUnusual column comparisons and query performanceNon-clustered indexes for columns defined within a composite Primary Key
here, In the code where exists clause
contains all primary key columns in where
, I want to know that the sequence of this columns in it, matters in query performance.
update temp_fd_dtl_svj a
set a.LAST_INT_PAID_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('I')
)
, a.LAST_PROV_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('P')
)
, a.LAST_TDS_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('T')
)
where exists (select *
from temp_fd_int_svj c
where a.acct_cd = c.acct_CD
and a.comp_cd = c.comp_cd
and a.BRANCH_CD = c.BRANCH_CD
AND a.ACCT_TYPE = c.ACCT_TYPE
and a.fd_no = c.FD_NO
)
;
oracle query-performance oracle-12c postgresql-performance performance-tuning
New contributor
add a comment |
here, In the code where exists clause
contains all primary key columns in where
, I want to know that the sequence of this columns in it, matters in query performance.
update temp_fd_dtl_svj a
set a.LAST_INT_PAID_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('I')
)
, a.LAST_PROV_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('P')
)
, a.LAST_TDS_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('T')
)
where exists (select *
from temp_fd_int_svj c
where a.acct_cd = c.acct_CD
and a.comp_cd = c.comp_cd
and a.BRANCH_CD = c.BRANCH_CD
AND a.ACCT_TYPE = c.ACCT_TYPE
and a.fd_no = c.FD_NO
)
;
oracle query-performance oracle-12c postgresql-performance performance-tuning
New contributor
add a comment |
here, In the code where exists clause
contains all primary key columns in where
, I want to know that the sequence of this columns in it, matters in query performance.
update temp_fd_dtl_svj a
set a.LAST_INT_PAID_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('I')
)
, a.LAST_PROV_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('P')
)
, a.LAST_TDS_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('T')
)
where exists (select *
from temp_fd_int_svj c
where a.acct_cd = c.acct_CD
and a.comp_cd = c.comp_cd
and a.BRANCH_CD = c.BRANCH_CD
AND a.ACCT_TYPE = c.ACCT_TYPE
and a.fd_no = c.FD_NO
)
;
oracle query-performance oracle-12c postgresql-performance performance-tuning
New contributor
here, In the code where exists clause
contains all primary key columns in where
, I want to know that the sequence of this columns in it, matters in query performance.
update temp_fd_dtl_svj a
set a.LAST_INT_PAID_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('I')
)
, a.LAST_PROV_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('P')
)
, a.LAST_TDS_DT = ( select max(b.TRAN_DT) from temp_fd_int_svj b
where a.COMP_CD = b.comp_cd and a.BRANCH_CD = b.BRANCH_CD and a.ACCT_CD = b.ACCT_CD
and a.ACCT_TYPE = b.ACCT_TYPE and a.fd_no = b.FD_NO and b.Tran_type in ('T')
)
where exists (select *
from temp_fd_int_svj c
where a.acct_cd = c.acct_CD
and a.comp_cd = c.comp_cd
and a.BRANCH_CD = c.BRANCH_CD
AND a.ACCT_TYPE = c.ACCT_TYPE
and a.fd_no = c.FD_NO
)
;
oracle query-performance oracle-12c postgresql-performance performance-tuning
oracle query-performance oracle-12c postgresql-performance performance-tuning
New contributor
New contributor
New contributor
asked 3 mins ago
abhithombare45abhithombare45
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
abhithombare45 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231886%2fdoes-sequence-of-columns-in-where-condition-matters-the-sequence-of-composite-ke%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
abhithombare45 is a new contributor. Be nice, and check out our Code of Conduct.
abhithombare45 is a new contributor. Be nice, and check out our Code of Conduct.
abhithombare45 is a new contributor. Be nice, and check out our Code of Conduct.
abhithombare45 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f231886%2fdoes-sequence-of-columns-in-where-condition-matters-the-sequence-of-composite-ke%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown