Update statement can be used depending on the result cache?

Hi all

I stumbled on an interesting question. UPDATE statement is used in the following function, even if the feature is created RESULT_CACHE. It seems illogical. I was wondering, is it possible?

If so, why RESULT_CACHE is used?  Because it means "do not execute the function, look for the result of the hash table and return the results to the user ' if the UPDATE statement, so doesn't mean it should run for each call and use with RESULT_CACHE and UPDATE/DELETE/MERGE is illogical or wrong?

Thanks for your help.

FUNCTION to CREATE or REPLACE plch_get_data (FULL id_in)

RETURN VARCHAR2

RESULT_CACHE

IS

BEGIN

Dbms_output.put_line ('run');

UPDATE plch_data

SET nm = UPPER (nm)

WHERE id = id_in;

COMMIT;

RETURN "SUPERIOR."

END;

/

Yes, it's the challenge of PL/SQL quiz - and the point of the quiz is only automatic relies on parsing by Oracle only supports arrays of account that is QUESTIONED.

The tables that are affected by DML not a query as an update do not figure in automatic invalidation of a cache.

I was hoping that the explanations given in the questionnaire itself would not lead to a thread - rather it would provide a pleasant and clear answer. So feel free to let me know if you think otherwise.

As to why Oracle would let you include DML not a query inside a function of caching of result, well... I can easily accept that you shouldn't do this - in general. But I don't see that we should make it impossible. It would probably be a good candidate for an another PLW (PL/SQL warning), as in:

"Non-requetes DML in a result caching function will not affect caching and can result in unexpected results."

Tags: Database

Similar Questions

Maybe you are looking for

  • Can I follow a mixed network router on Mac?

    I have a new router Linksys EA7500 which I use to extend (bridge mode) my Time Capsule Apple's 802.11n Airport (4th generation). When using my old Airport Express in the same way that I could easily monitor devices using Airport utility (6.3.6) list

  • ENVY 27: SMART disk error

    Since yesterday my PC Envy 27 reports error Smart HD.   The details of the error message are: The hard drive name: 10000LM014-1EJ164-SSHD Volume: C:\;D:\ I managed to back up my files. PC ist still restart but with repeated error note. I did the Wind

  • XNET buffer problem

    I'm tasting a CAN signal to 5 KHz. The signal is sent to every American (approx.) 240 (~ 4 KHz). I chose the mode of Signal waveform with ResampRate with 5000, to make me a resampling of the signal received at the rate of 5 KHz. I get a read buffer o

  • USB PORTS to shut DOWN Windows XP

    After being inactive for some time, usb ports on the computer do not work properly. A USB keyboard and a USB mouse is connected. After the passage of the mouse in the remaining 4 different ports he can finally start working again. I checked all of th

  • Cannot install for photosmart d110 driver because not digitally signed

    D110 Photosmart all-in-one.  Cannot install driver after running recovory disc. Windows 7 64 bit Dell Inspiron 580. I had to run the recovery disk after receiving the virus/malware.  It seems that all the other printer drivers are on my computer.  I