- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Execution plan on Oracle
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Execution plan on Oracle"
Collapse
-
Ah, never mind. It's just an indication of the number of rows likely to be returned according to database statistics.
-
Execution plan on Oracle
I've got these results from an EXPLAIN on SQL on Oracle:
This looks to me like rather a bad access path. It certainly takes a long time.Code:SELECT "BUKRS", "BELNR", "GJAHR" FROM "BKPF" WHERE "MANDT" = :A0 AND ( "CPUDT" > :A1 AND "CPUDT" < :A2 OR "CPUDT" = :A3 AND "CPUTM" >= :A4 OR "CPUDT" = :A5 AND "CPUTM" <= :A6 OR "AEDAT" >= :A7 AND "AEDAT" <= :A8 OR UPDDT >= :A9 AND "UPDDT" <= :A10 ) AND "AWTYP" = :A11 Execution Plan --------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| --------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 2223K| 137M| 391K (2)| |* 1 | TABLE ACCESS BY INDEX ROWID| BKPF | 2223K| 137M| 391K (2)| |* 2 | INDEX RANGE SCAN | BKPF~4 | 2223K| | 5181 (4)| --------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 1 - filter("UPDDT">=:A9 AND "UPDDT"<=:A10 OR "CPUDT">:A1 AND "CPUDT"<:A2 OR "AEDAT">=:A7 AND "AEDAT"<=:A8 OR "CPUDT"=:A3 AND "CPUTM">=:A4 OR "CPUDT"=:A5 AND "CPUTM"<=:A6) 2 - access("MANDT"=:A0 AND "AWTYP"=:A11) )
If I pull out the AEDAT and UPDDT field out, I get this:
Which looks a lot better. Trouble is I can't find anything I can understand on the various oracle sites, what the Rows column mean. So I'm not sure my analysis is correct.Code:SELECT "BUKRS", "BELNR", "GJAHR" FROM "BKPF" WHERE "MANDT" = :A0 AND ( "CPUDT" > :A1 AND "CPUDT" < :A2 OR "CPUDT" = :A3 AND "CPUTM" >= :A4 OR "CPUDT" = :A5 AND "CPUTM" <= :A6 ) AND "AWTYP" = :A11 Execution Plan ---------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| ---------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 5647 | 259K| 81617 (10)| | 1 | CONCATENATION | | | | | |* 2 | TABLE ACCESS BY INDEX ROWID| BKPF | 44 | 2068 | 3700 (57)| |* 3 | INDEX SKIP SCAN | BKPF~5 | 14808 | | 3083 (68)| |* 4 | TABLE ACCESS BY INDEX ROWID| BKPF | 44 | 2068 | 3700 (57)| |* 5 | INDEX SKIP SCAN | BKPF~5 | 14808 | | 3083 (68)| |* 6 | TABLE ACCESS BY INDEX ROWID| BKPF | 5559 | 255K| 74217 (5)| |* 7 | INDEX RANGE SCAN | BKPF~5 | 170K| | 67134 (5)| ---------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - filter("CPUTM"<=:A6 AND "AWTYP"=:A11) 3 - access("MANDT"=:A0 AND "CPUDT"=:A5) filter("CPUDT"=:A5) 4 - filter("CPUTM">=:A4 AND "AWTYP"=:A11 AND (LNNVL("CPUDT"=:A5) OR LNNVL("CPUTM"<=:A6))) 5 - access("MANDT"=:A0 AND "CPUDT"=:A3) filter("CPUDT"=:A3) 6 - filter("AWTYP"=:A11 AND (LNNVL("CPUDT"=:A5) OR LNNVL("CPUTM"<=:A6)) AND (LNNVL("CPUDT"=:A3) OR LNNVL("CPUTM">=:A4))) 7 - access("MANDT"=:A0 AND "CPUDT">:A1 AND "CPUDT"<:A2) filter("CPUDT">:A1 AND "CPUDT"<:A2)
Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: