Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bind Peeking only for "known" columns?

fjfrankenJan 14 2015 — edited Jan 15 2015

Hi all,

We are working on our 11.2.0.3 RAC (on AIX 7.1) database on trying to figure out why a certain repeated query ( batch load) is not using the correct execution plan.

The query itself looks like:

select CATENTRY_ID from CATENTRY where ((PARTNUMBER=:1 ) OR ((0 = :2 ) AND (PARTNUMBER IS NULL))) and ((MEMBER_ID=:3 ) OR ((0 = :4 ) AND (MEMBER_ID IS NULL)));

This query is an IBM Webshere internal query, which therefore is unchangeable.

The table in question has an Index available on PARTNUMBER & MEMBER_ID

The execution plan however looks like

The execution plan of the above statement looks like:

Execution Plan

----------------------------------------------------------

0 SELECT STATEMENT Optimizer Mode=ALL_ROWS (Cost=2038 Card=1 Bytes=23)

1 0 TABLE ACCESS FULL WCSADMIN.CATENTRY (Cost=2038 Card=1 Bytes=23)

So a FTS scan is used where an Index-lookup would be expected.

The values passed to this query are e.g.:

:1 = XA-GED-1068849

:2 = 1

:3 = -6000

:4 = 1

With the part of the WHERE CLAUSE then having ((0=1) AND (PARTNUMBER IS NULL)) and the same for ((0=1) AND (MEMBER_ID IS NULL)) would result in an Index lookup.:

select

catentry_id

from catentry

where ( (partnumber = 'XA-GED-5702810')

  or ( (0 = 1)

  and (partnumber is null)))

and ( (member_id = -6000)

  or ( (0 = 1)

  and (member_id is null))) ;

Execution Plan

----------------------------------------------------------

0 SELECT STATEMENT Optimizer Mode=ALL_ROWS (Cost=3 Card=1 Bytes=23)

1 0 TABLE ACCESS BY INDEX ROWID WCSADMIN.CATENTRY (Cost=3 Card=1 Bytes=23)

2 1 INDEX UNIQUE SCAN WCSADMIN.I0000064 (Cost=2 Card=1)

Somewhere in the parsing of the query the optimizer does not have/use all the information needed to determine the correct plan, allthough the tracefile shows all values are captured correctly

I would expect that the optimizer would "PEEK" all available variables to determine the best execution plan.

It looks however that the two BINDs for the "0=:2" and "0=:4" are not "peeked" and therefore not used, which results in a Full Table Scan as the PARTNUMBER IS NULL and MEMBER_ID IS NULL are not skipped.

Can anyone confirm that only BINDs for "existing/real" columns are peeked??

And is this configurable ??

Thanks

FJ Franken

This post has been answered by Jonathan Lewis on Jan 14 2015
Jump to Answer

Comments

This is a legitimate email.

Oracle + Dyn domain registration services have been transferred to name.com. Domain Registration customers received a notice on December 4th regarding the transition of our Domain Registration Business.

Please use the following links for answers to any questions you may have:


Copy of email sent: https://dyn.com/wp-content/uploads/2019/12/dom-reg-updates.pdf

To onboard with name.com: https://www.name.com/welcome-to-name?cb=dyn_domino

Our FAQ: https://help.dyn.com/domain-name-transition-to-name-com-faq/

Mike

Oracle + Dyn

2ca554a5-e6b7-42d2-ad7c-64789b6a7318

With the move to name.com how do we continue to update our standard dns entries dynamically?

Also, how do we register new domains and use the dyndns client to update host entries dynamically?

RotBlitz

The Standard DNS service will be decommissioned end of May, 2020.  You could migrate to OCI, but this does not support Dynamic DNS updates yet.  So your best bet is to look for another Dynamic DNS hosting service which can support your domain.

Regarding new domains, you register them at name.com or any other registrar.  And, as I said, you choose a Dynamic DNS hosting service for your domains.

After all, you may say "Good Bye" to Oracle/Dyn, because it looks like they cannot support your needs in the future.

See https://www.oracle.com/corporate/acquisitions/dyn/technologies/migrate-your-services/

RotBlitz wrote:

The Standard DNS service will be decommissioned end of May, 2020.

This date has actually recently been extended to May 31, 2022. At present, all aspects of this service remain in tact and are supported by Oracle/Dyn until this new end date. Recent as in within the past 2 weeks.

Mike

Oracle + Dyn

RotBlitz

Michael.R.Taylor-Oracle wrote:

This date has actually recently been extended to May 31, 2022.

Oops, sorry; I was not aware of this change.

Don't be - as I shared its a recent change and I don't believe its been shared outside of emails to customers. Its easy to mistake those for marketing/automated communications sometimes

1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 12 2015
Added on Jan 14 2015
15 comments
3,371 views